spyder: Can't open Spyder even after fresh Anaconda install/in new environment
Description of your problem
What steps will reproduce the problem?
I’ve been having issues starting Spyder due to Qt Bindings. On a fresh anaconda install I’ve made a new environment, installed spyder and tried to open it with no luck i.e.
conda create --name spydertest
activate spydertest
conda install spyder
spyder
What is the expected output? What do you see instead? I expected Spyder to launch however instead got the following error message:
Traceback (most recent call last):
File "D:\Anaconda3\envs\spydertest\lib\site-packages\qtpy\__init__.py", line 148, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ImportError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\envs\spydertest\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "D:\Anaconda3\envs\spydertest\lib\site-packages\spyder\app\start.py", line 144, in main
from spyder.app import mainwindow
File "D:\Anaconda3\envs\spydertest\lib\site-packages\spyder\app\mainwindow.py", line 49, in <module>
requirements.check_qt()
File "D:\Anaconda3\envs\spydertest\lib\site-packages\spyder\requirements.py", line 39, in check_qt
import qtpy
File "D:\Anaconda3\envs\spydertest\lib\site-packages\qtpy\__init__.py", line 154, in <module>
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
Please provide any additional information below Conda env:
# packages in environment at D:\Anaconda3\envs\spydertest:
#
alabaster 0.7.10 py35h3a808de_0
asn1crypto 0.23.0 py35h65de013_0
astroid 1.5.3 py35h82ecf54_0
babel 2.5.0 py35hcd66c26_0
bleach 2.1.1 py35h73b2768_0
ca-certificates 2017.08.26 h94faf87_0
certifi 2017.11.5 py35h456c6ae_0
cffi 1.11.2 py35h74ad5ef_0
chardet 3.0.4 py35h177e1b7_1
colorama 0.3.9 py35h32a752f_0
cryptography 2.1.4 py35h8ead9e0_0
decorator 4.1.2 py35hc7d1f2e_0
docutils 0.14 py35h8ccb97f_0
entrypoints 0.2.3 py35hb91ced9_2
html5lib 1.0.1 py35h047fa9f_0
icu 58.2 ha66f8fd_1
idna 2.6 py35h8dcb9ae_1
imagesize 0.7.1 py35h7f87e83_0
ipykernel 4.7.0 py35h2f9c1c0_0
ipython 6.2.1 py35h4a2ac14_1
ipython_genutils 0.2.0 py35ha709e79_0
isort 4.2.15 py35h0bf7b49_0
jedi 0.11.0 py35_2
jinja2 2.10 py35hdf652bb_0
jpeg 9b hb83a4c4_2
jsonschema 2.6.0 py35h27d56d3_0
jupyter_client 5.1.0 py35hcddec19_0
jupyter_core 4.4.0 py35h629ba7f_0
lazy-object-proxy 1.3.1 py35he996729_0
libpng 1.6.32 h140d38e_4
markupsafe 1.0 py35hc253e08_1
mccabe 0.6.1 py35hcf31250_1
mistune 0.8.1 py35h7e79247_0
nbconvert 5.3.1 py35h98d6c46_0
nbformat 4.4.0 py35h908c9d9_0
numpydoc 0.7.0 py35h72ac4f2_0
openssl 1.0.2n h74b6da3_0
pandoc 1.19.2.1 hb2460c7_1
pandocfilters 1.4.2 py35h978f723_1
parso 0.1.1 py35he39c48a_0
pickleshare 0.7.4 py35h2f9f535_0
pip 9.0.1 py35h691316f_4
prompt_toolkit 1.0.15 py35h89c7cb4_0
psutil 5.4.1 py35h5f28cdc_0
pycodestyle 2.3.1 py35h35694a3_0
pycparser 2.18 py35h15a15da_1
pyflakes 1.6.0 py35hb7fdafe_0
pygments 2.2.0 py35h24c0941_0
pylint 1.7.4 py35h717b2e0_0
pyopenssl 17.5.0 py35h75c5b16_0
pyqt 5.6.0 py35hd46907b_5
pysocks 1.6.7 py35hb30ac0d_1
python 3.5.4 h1357f44_23
python-dateutil 2.6.1 py35h6b299a3_1
pytz 2017.3 py35hb294b1a_0
pyzmq 16.0.3 py35h1861011_0
qt 5.6.2 vc14h6f8c307_12 [vc14]
qtawesome 0.4.4 py35h639d0ff_0
qtconsole 4.3.1 py35hc47b0dd_0
qtpy 1.3.1 py35h4918c39_0
requests 2.18.4 py35h54a615f_1
rope 0.10.7 py35h5756fe0_0
setuptools 36.5.0 py35h21a22e4_0
simplegeneric 0.8.1 py35h6406082_0
sip 4.18.1 py35h01cbaa7_2
six 1.11.0 py35hc1da2df_1
snowballstemmer 1.2.1 py35h4c55bfa_0
sphinx 1.6.3 py35heeac824_0
sphinxcontrib 1.0 py35h45f5ca3_1
sphinxcontrib-websupport 1.0.1 py35ha3690eb_1
spyder 3.2.4 py35h467e5b4_0
sqlite 3.20.1 h9eeafa9_2
testpath 0.3.1 py35h06cf69e_0
tornado 4.5.2 py35h03246f3_0
traitlets 4.3.2 py35h09b975b_0
typing 3.6.2 py35h37628ea_0
urllib3 1.22 py35h8cc84eb_0
vc 14 h2379b0c_2
vs2015_runtime 14.0.25123 hd4c4e62_2
wcwidth 0.1.7 py35h6e80d8a_0
webencodings 0.5.1 py35h5d527fb_1
wheel 0.30.0 py35h38a90bc_1
win_inet_pton 1.0.1 py35hbef1270_1
win_unicode_console 0.5 py35h56988b5_0
wincertstore 0.2 py35hfebbdb8_0
wrapt 1.10.11 py35h54666f7_0
zlib 1.2.11 h8395fce_2
Versions and main components
- Spyder Version: 3.2.4
- Python Version: 3.5.4
- Qt Version: 5.6.2
- PyQt Version: 5.6.0
- Operating system: Windows 10
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 32 (15 by maintainers)
@CAM-Gerlach Thank you very much, it worked for me! To sum up, this is what I did to resolve the problem:
Just uninstall PyQt5
pip uninstall PyQt5and install qtpypip install qtpyworks for meThanks for the tip @ccordoba12 but
Besides, uninstalling spyder and doing
pip install -U spydergives same situationThen
Thanks for trying to help; however, this is known, closed issue who’s actual cause (at least in the actual original issue report) is actually quite different from the one you state, and no further individuals have commented asking for assistance with it (or opened a new issue).
This could be one cause of that error, but apparently was not in this case based on the original issue report, and there are a number of potential others (including this one) which your suggestion does not address. Therefore, it will not
surely resolve your problem.Not explicitly necessary, but doesn’t hurt.
The Anaconda Navigator GUI doesn’t have anything to do with this; I’m not sure why you’re suggesting it.
The above is also missing a crucial step for many if not most such cases, which is ensuring the
condaPyQt package is installed properly:conda install --force-reinstall pyqt qt.I think it’s better to add these warning in qtpy instead of in Spyder itself. I’ll open a new issue for that.
Thanks for the quick help. I had updated my conda to 4.5.4. The install of spyder was accompanied as dependency by
I then did a second attempt with first conda installing pyqt then spyder. But still no luck.
Then in that environment I followed your advice to install
pyqt5.6and now success.Thanks for helping me out.
Okay, thanks for clarifying. In that case, did you then try
conda install pyqt? Some older versions of Spyder may not have had it installed automatically as a dependency since multiple versions were possible (I know that was true withpip, not 100% sure aboutconda). If the message is displayed as above, then that would probably be the possible anaconda bug discussed previously. In any case, you can try updating anaconda itself (conda update condathenconda update anacondafrom thebaseenvironment, then create a fresh environment in the same way you did above, install spyder, and if it still doesn’t work try pyqt5.6 instead (conda install pyqt=5.6) and see if it works under that.@jfbu, you need to do