Skip to main content
 首页 » 编程设计

python之无法运行 Spyder,因为没有名为 'PySide' 的模块

2025年05月04日21freeliver54

我想尝试使用 Spyder IDE。我正在阅读有关如何打开和运行 Spyder 的页面:https://github.com/spyder-ide/spyder/releases

我输入了页面中指定的以下命令:

conda update qt pyqt 
conda update spyder 

这两个命令都给出了“# All requested packages already installed.”。

然后我在我的终端 (Mac) 中输入 spyder:

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> 

因此,我尝试安装 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. 

我应该怎么做才能开始使用 Spyder?

请您参考如下方法:

试试下面的命令让我知道它是否有效。

 pip install msgpack 
 conda install qt=5.6 pyqt=5.6 sip=4.18