当我尝试在cmd中运行spyder(任何版本的spyder)时,出现以下错误。
Traceback (most recent call last):
File "C:\Users\bjwil\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\bjwil\Anaconda3\Lib\site-packages\spyder\app\start.py", line 186, in main
from spyder.app import mainwindow
File "C:\Users\bjwil\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 87, in <module>
from qtpy import QtSvg # analysis:ignore
File "C:\Users\bjwil\Anaconda3\Lib\site-packages\qtpy\QtSvg.py", line 14, in <module>
from PyQt5.QtSvg import *
ImportError: DLL load failed: The specified procedure could not be found.
在MinGW Git for Windows中运行spyder时,我没有收到此错误。我已经看了几个小时,但似乎找不到答案。我在Anaconda3文件夹中有来自Anaconda3的python3.dll
和python36.dll
扩展名。我也无法卸载PyQt5(获取PackagesNotFoundError: The following packages are missing from the target environment:
- pyqt5
)并使用conda install -c dsdale24 pyqt5
或conda install --channel https://conda.anaconda.org/bpentz pyqt5
重新安装。我得到:
Collecting package metadata: done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- conda[version='>=4.6.7']
- pyqt5
Use "conda search <package> --info" to see the dependencies for each package.
答案 0 :(得分:2)
conda update --all
为我解决了同一问题。
答案 1 :(得分:1)
此问题可能有不同的原因。有时是因为您忘记在anaconda环境中安装spyder。
您可以通过运行anaconda提示符来安装Spyder
conda install spyder
此外,您可以转到anaconda导航器来安装spyder。