不能 运行 Spyder 因为没有名为 'PySide' 的模块
Cannot run Spyder because No module named 'PySide'
我想尝试使用 Spyder IDE。我正在阅读有关如何打开和 运行 Spyder 的页面:https://github.com/spyder-ide/spyder/releases
我输入了页面中指定的以下命令:
conda update qt pyqt
conda update spyder
这两个命令都给出了“# All requested packages already installed”。
然后我在我的终端中输入了 spyder (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>
所以,我尝试安装 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
J 先生
我和 Doug Fir 有同样的问题。我使用了这些命令。我从 DOS 提示符下启动了 spyder。我得到了 "RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa" 和以前一样。就在我翻白眼的时候,Spyder 走在前面开始了。所以我认为它有效。
虽然在网络上找到的其他解决方案对我不起作用(例如上面使用 $ pip install pyqt5
的解决方案),但我通过终端使用 pip 卸载并重新安装 Spyder 解决了这个问题。
$ pip uninstall spyder
...
$ pip install spyder
...
不知道为什么,但第一次尝试就成功了。
尝试删除.condarc 文件。我不知道具体原因,但我遇到了同样的问题,当我删除 .condarc 文件时,它对我有用。
我想尝试使用 Spyder IDE。我正在阅读有关如何打开和 运行 Spyder 的页面:https://github.com/spyder-ide/spyder/releases
我输入了页面中指定的以下命令:
conda update qt pyqt
conda update spyder
这两个命令都给出了“# All requested packages already installed”。
然后我在我的终端中输入了 spyder (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>
所以,我尝试安装 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
J 先生
我和 Doug Fir 有同样的问题。我使用了这些命令。我从 DOS 提示符下启动了 spyder。我得到了 "RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa" 和以前一样。就在我翻白眼的时候,Spyder 走在前面开始了。所以我认为它有效。
虽然在网络上找到的其他解决方案对我不起作用(例如上面使用 $ pip install pyqt5
的解决方案),但我通过终端使用 pip 卸载并重新安装 Spyder 解决了这个问题。
$ pip uninstall spyder
...
$ pip install spyder
...
不知道为什么,但第一次尝试就成功了。
尝试删除.condarc 文件。我不知道具体原因,但我遇到了同样的问题,当我删除 .condarc 文件时,它对我有用。