Issue with Spyder in Python 3.6
See original GitHub issueProblem Description
Having issues running Spyder on Python Environments that are not my base environment. In Spyder for Python 3.4, 3.5, 3.6, I can’t get Spyder to launch, if I try in Win Cmd Prompt it cites some issue with PySide. I setup environment with Python 3.3 and my Spyder install forced me to upgrade to 3.6. I can get Spyder to work and sometimes run a basic line, but I get cache error messages in terminal when I try to run a script. I don’t have problems in my base environment which runs Python 2.7
What steps will reproduce the problem?
- Open Spyder for Python 3.3 via Windows Start Menu, Win Cmd Prompt or Git bash
- Run a script or basic line like
4/3
- Watch Kernel crash and see error output in terminal
What is the expected output? What do you see instead?
Here is result I see when I launch via Git Bash with Administrator Privileges. These errors appear before I can run a single python command in Spyder.
$ spyder
[15764:14556:0409/214138.627:ERROR:cache_util_win.cc(20)] Unable to move the cache: 5
[15764:14556:0409/214138.627:ERROR:cache_util.cc(134)] Unable to move cache folder C:\Users\Jordan\AppData\Local\Spyder\QtWebEngine\Default\GPUCache to C:\Users\Jordan\AppData\Local\Spyder\QtWebEngine\Default\old_GPUCache_000
[15764:14556:0409/214138.627:ERROR:cache_creator.cc(134)] Unable to create cache
[15764:14556:0409/214138.627:ERROR:shader_disk_cache.cc(570)] Shader Cache Creation failed: -2
I can then run some basic commands in Spyder IDE like 4/3
but can’t execute scripts.
If I launch via Windows Start Menu I get the error but just see the kernel restarting.
(py33) C:\Users\Jordan>spyder
Traceback (most recent call last):
File "C:\Users\Jordan\Anaconda2\envs\py33\lib\site-packages\qtpy\__init__.py", line 163, 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 "C:\Users\Jordan\Anaconda2\envs\py33\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\Jordan\Anaconda2\envs\py33\lib\site-packages\spyder\app\start.py", line 159, in main
from spyder.app import mainwindow
File "C:\Users\Jordan\Anaconda2\envs\py33\lib\site-packages\spyder\app\mainwindow.py", line 49, in <module>
requirements.check_qt()
File "C:\Users\Jordan\Anaconda2\envs\py33\lib\site-packages\spyder\requirements.py", line 39, in check_qt
import qtpy
File "C:\Users\Jordan\Anaconda2\envs\py33\lib\site-packages\qtpy\__init__.py", line 169, in <module>
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
However I am unable to install PySide since it appears to require Python 3.3. Should I force a downgrade to Python 3.3 to get this working? Is this safe?
Paste Traceback/Error Below (if applicable)
Package Versions
- Spyder: 3.2.8 but listing for version py36_0. Not sure if this is common
- Python: 3.6.5 (Initially installed Python 3.3, but noticed that Spyder forced this update)
- Qt: 5.9.4
- PyQt: 5.9.2
- Operating System: Win10 64bit
Dependencies
IPython >=4.0 : 6.3.1 (OK)
cython >=0.21 : None (NOK)
jedi >=0.9.0 : 0.11.1 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
numpy >=1.7 : 1.14.2 (OK)
pandas >=0.13.1 : None (NOK)
pycodestyle >=2.3: 2.3.1 (OK)
pyflakes >=0.6.0 : 1.6.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.8.4 (OK)
qtconsole >=4.2.0: 4.3.1 (OK)
rope >=0.9.4 : 0.10.7 (OK)
sphinx >=0.6.6 : 1.7.2 (OK)
sympy >=0.7.3 : None (NOK)
Issue Analytics
- State:
- Created 5 years ago
- Comments:29 (13 by maintainers)
Top GitHub Comments
We appreciate you trying to help and share something that worked for you on a superficially similar error, but if you are going to post a potential solution, please do so on an open, non-duplicate issue and take care to read the actual issue report, as in both these cases the issue was not caused by the same problem and would not be fixed by your solution, and furthermore was already resolved and closed. Thanks.
This is but one of many potential causes of this error, the reporter explicitly stated that they have not used
pip
to install PyQt5 at any point, so it of course cannot be the case here, There are many other cases of this error as well which your suggestion will notsurely 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
conda
PyQt package is installed properly:conda install --force-reinstall pyqt qt
.I managed to solve that as follow: 1- Run this on Anaconda prompt : conda install -c anaconda pyqt 2 - Uninstall and install Spyder through Anaconda navigator.