Cannot run Spyder because No module named 'PySide'
Solution 1
try below commands let me know if it works.
pip install msgpack
conda install qt=5.6 pyqt=5.6 sip=4.18
Solution 2
While other solutions found on the web didn't work for me (such as the one above and using $ pip install pyqt5
), I solved this by uninstalling and reinstalling Spyder via terminal, using pip.
$ pip uninstall spyder
...
$ pip install spyder
...
Not sure why, but it worked on the first try.
Solution 3
Mr J.
I had the same problem as Doug Fir. I used these commands. I launched spyder from the DOS prompt. I got "RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa" as was the case before. Just as I was rolling my eyes, Spyder went ahead and started. So I think it worked.
Related videos on Youtube
Doug Fir
Updated on June 04, 2022Comments
-
Doug Fir about 2 years
I wanted to try using Spyder IDE. I was reading this page on how to open and run Spyder: https://github.com/spyder-ide/spyder/releases
I typed the following commands as specified in the page:
conda update qt pyqt conda update spyder
Both commands gave "# All requested packages already installed.".
I then typed spyder into my terminal (Mac):
Macs-MacBook:~ macuser$ spyder Traceback (most recent call last): File "/anaconda3/lib/python3.6/site-packages/qtpy/__init__.py", line 166, in <module> from PySide import __version__ as PYSIDE_VERSION # analysis:ignore ModuleNotFoundError: No module named 'PySide' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/anaconda3/bin/spyder", line 11, in <module> sys.exit(main()) File "/anaconda3/lib/python3.6/site-packages/spyder/app/start.py", line 159, in main from spyder.app import mainwindow File "/anaconda3/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 49, in <module>
So, I tried to install PySide:
Macs-MacBook:~ macuser$ conda install PySide Solving environment: failed UnsatisfiableError: The following specifications were found to be in conflict: - anaconda==5.2.0=py36_3 - pyside Use "conda info <package>" to see the dependencies for each package.
What should I do to get up and running with Spyder?
-
Doug Fir almost 6 yearsHi, I'm using anaconda. I'm new to python but the docs and various resources I've read over the past few days have consistently told me to not use pip while I have anaconda. Is this true?
-
Doug Fir almost 6 yearsThank you! This worked with the conda command option that you provided. How did you know to use
conda install qt=5.6 pyqt=5.6 sip=4.18
? It's pretty specific -
jits_on_moon almost 6 yearsplease mark answer so that it will be useful for others. basically, you can execute below command to understand which specific version is installed on your machine. conda list --show-channel-urls
-
-
AMC about 4 yearsCan you explain what the issue is, and why this works?
-
endolith over 3 yearsYou should be using conda to install msgpack, not pip