ImportError: cannot import name 'STL' from 'statsmodels.tsa.seasonal' - jupyter-notebook

I have this issue now, I cannot import STL from statsmodels. I've tried to uninstall statsmodels as it was recommended somewhere with a similar issue but it is not possible, at least the way I do it:
!pip uninstall statsmodels - NOT working.

It seems that the STL function from statsmodels is not included in the latest stable version of the library (0.10.2) but is in the dev version (0.11.0dev0).
You can build and install this specific version with this command: pip install git+https://github.com/statsmodels/statsmodels.git
For this you may need a c compiler if you don't already have one, everything is explained here: https://www.statsmodels.org/dev/install.html#installation-from-source
I've also found this package that seems promising: https://github.com/jrmontag/STLDecompose

Use this:
pip install statsmodels==0.12.1

Related

AttributeError: module 'scipy.sparse' has no attribute 'coo_array'

Getting this error in my Jupyter Notebook
What would be the best way to fix this utilizing conda instead of pip
I've attempted conda upgrade --all and that didnt seem to work
The scipy.sparse.*_array functions were introduced with v1.8. The networkx package started requiring scipy >=1.8 with v2.7. So, either upgrade SciPy
conda install 'scipy>=1.8'
or downgrade NetworkX:
conda install 'networkx<2.7'
Part of the issue here is that, at the recommendation of a networkx developer, Conda Forge stopped explicitly requiring scipy as a dependency of networkx, and therefore there is no longer any constraint. I opened an issue on the feedstock to revisit coinstallation constraints (run_constrained specifications).
As mentioned in this Github comment, I was trying to calculate the page rank (networkx.pagerank) of a graph on Google Colab when I encountered the same error. After executing the following code, the issue was resolved for me:
!pip install --upgrade scipy networkx
A Side Note: pip install refers to installing packages and leave the package as-is if it is already installed. But the --upgrade flag instructs pip to uninstall anything which is being upgraded/replaced. For more info on this, refer this official doc.
I encountered similar error
I could solve it by installing these versions of newtorkx and scipy:
!pip install 'networkx<2.7'
!pip install 'scipy>=1.8'

No module named 'charset_normalizer.md__mypyc'

I'm using PyInstaller to compile a program and keep coming across the error "No module named 'charset_normalizer.md__mypyc.'" The Charset-Normalizer package is installed.
As a test, I tried re-compiling a program that I had previously created in early September without issue, but now receive the same error. I thought that maybe there is an issue with the versions of either PyInstaller or Charset-Normalizer so I've experimented with different versions, but cannot get it to work.
You are probably missing the "chardet" library
I installed it and it worked.
pip install chardet
I had the EXACT problem. Scripts that I was able to make into executables using Pyinstaller before I could no longer do so again. In my script I used the pdfplumber package, which when you install it also installs other packages like pillow, wand, charset-normalizer, etc.
Since the error was regarding charset-normalizer for me as well, I tried different versions of it. For me it was version 2.1.0 that made the executable work again. Install it with the "pip install charset-normalizer==2.1.0" command: https://pypi.org/project/charset-normalizer/2.1.0/.
If it does not work, go to "Release history" on that link and try another version. Try to remember when was the last time you created a working executable and get the version you think will work for you.
This worked for me:
I just added
from charset_normalizer import md__mypyc
to the top of my python script.
https://stackoverflow.com/a/58449206/20576777
If you don't have the charset-normalizer library installed, then you should install it using the following command:
pip install charset-normalizer
I got it to work by installing older versions of PyInstaller and Charest-Normalizer. Anytime this messages pops-up, consider installing an older version of the package.
Pyinstaller may sometimes miss your dependency. In such a case run pyinstaller with the --collect-all option.
In this case --collect-all charset_normalizer should force pyinstaller to include the dependency.

Frappe installation error "AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'"

When I install frappe ( version-13 ) on linux
when I run bench init
it gives an error
ERROR: httplib2 0.20.1 has requirement pyparsing<3,>=2.4.2, but you'll have pyparsing 3.0.0 which is incompatible.
though the installation goes through.
After that when a new site is created it gives an error
AttributeError: module 'pyparsing' has no attribute 'downcaseTokens
which is a deprecated function not available in version 3.0 but available in 2.4.2
How do I get around this issue ? Can I force install an earlier version of pyparsing ?
Regards
Hari
That python package is using a deprecated function in pyparsing.
you can force install any version of a python module as,
pip install pyparsing==2.4.2
well I think I found a Fix for the one's who wants to use the current version of Pyparsing itself. The base package that it creating a problem is httplib2. so in order to rectify you need to update the httplib2 package.
pip install httplib2
I had issues with importing tf_slim package and got the same error !
$ pip install httplib2
This will resolve the "AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'" error.

OpenMDAO installation

I need openmdao on windows 8 to run an aerostructutal optimization code that uses it but I’m having issues in the installation process. I installed numpy and scipy through pip in the cmd and then also openmdao using pip install openmdao but when I try to run a .py with copied inside the code at the bottom of this page, I get an error about “Component” not being found to import. What am I doing wrong ?
Some codes are written for a specific version of OpenMDAO. If you are using OpenAeroStruct, it requires OpenMDAO 1.7.4, not OpenMDAO 2.2.x.
To obtain the correct version, you would need to use the command pip install openmdao==1.7.4 or to download and install the source directly from here: https://github.com/OpenMDAO/openmdao1, following the instructions on the README, not on readthedocs.

How do I install pyQt on MacOs, Python 3.5.1?

I already tried installing it with 'brew install pyqt' and the command did it's thing, but I still get an importing error.
You can try to follow this guide:
https://gist.github.com/guillaumevincent/10983814

Resources