(base) C:\Users\25023>spyder return
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 204, in
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\25023\anaconda3\Scripts\spyder-script.py”, line 10, in
sys.exit(main())
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\start.py”, line 201, in main
from spyder.app import mainwindow
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\app\mainwindow.py”, line 53, in
requirements.check_qt()
File “C:\Users\25023\anaconda3\lib\site-packages\spyder\requirements.py”, line 41, in check_qt
import qtpy
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 210, in
raise PythonQtError(‘No Qt bindings could be found’)
qtpy.PythonQtError: No Qt bindings could be found
(base) C:\Users\25023>pip install pyqt5
Requirement already satisfied: pyqt5 in c:\users\25023\appdata\roaming\python\python38\site-packages (5.15.4)
Collecting PyQt5-Qt5>=5.15
Using cached PyQt5_Qt5-5.15.2-py3-none-win32.whl (43.4 MB)
Collecting PyQt5-sip<13,>=12.8
Using cached PyQt5_sip-12.9.0-cp38-cp38-win32.whl (51 kB)
Installing collected packages: PyQt5-Qt5, PyQt5-sip
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
spyder 4.1.5 requires pyqtwebengine<5.13; python_version >= “3”, which is not installed.
spyder 4.1.5 requires pyqt5<5.13; python_version >= “3”, but you’ll have pyqt5 5.15.4 which is incompatible.
Successfully installed PyQt5-Qt5-5.15.2 PyQt5-sip-12.9.0
(base) C:\Users\25023>pip install --use-feature=2020-resolver pyqt5
Requirement already satisfied: pyqt5 in c:\users\25023\appdata\roaming\python\python38\site-packages (5.15.4)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\25023\anaconda3\lib\site-packages (from pyqt5) (12.9.0)
Requirement already satisfied: PyQt5-Qt5>=5.15 in c:\users\25023\anaconda3\lib\site-packages (from pyqt5) (5.15.2)
(base) C:\Users\25023>conda install pyqt
Collecting package metadata (current_repodata.json): done
Solving environment: done
Package Plan
environment location: C:\Users\25023\anaconda3
added / updated specs:
- pyqt
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-4.10.3 | py38h9f7ea03_0 2.9 MB
------------------------------------------------------------
Total: 2.9 MB
The following packages will be UPDATED:
conda 4.9.2-py38h9f7ea03_0 --> 4.10.3-py38h9f7ea03_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
conda-4.10.3 | 2.9 MB | ########################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(base) C:\Users\25023>conda install pyqt
Collecting package metadata (current_repodata.json): done
Solving environment: done
All requested packages already installed.
(base) C:\Users\25023>spyder
Traceback (most recent call last):
File “C:\Users\25023\anaconda3\lib\site-packages\qtpy_init_.py”, line 204, in
from PySide import version as PYSIDE_VERSION # analysis:ignore
Mo

本文记录了在尝试启动Spyder时遇到的问题,即Spyder与PyQt5版本不匹配导致的错误。通过检查错误信息,发现缺少PySide模块。尝试使用pip和conda安装不同版本的PyQt5和PyQtWebEngine,并最终成功通过安装与Spyder匹配的PyQt5版本(5.12.0)和PyQtWebEngine(5.12.0)来解决问题。
最低0.47元/天 解锁文章
3万+

被折叠的 条评论
为什么被折叠?



