【发布时间】:2019-07-24 17:22:58
【问题描述】:
当我尝试在 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.
【问题讨论】:
-
(这里是 Spyder 维护者) 我不明白你是怎么搞砸你的 Anaconda 安装的,但是要安装 pyqt5 你只需要运行
conda install pyqt,就是这样.如果在那之后您仍然遇到 DLL 错误,我建议您删除并重新安装 Anaconda,因为您可能通过尝试从dsdale24或bpentz等渠道安装软件包而损坏了当前安装。 -
谢谢。 Anaconda 网站上有它的原因吗:anaconda.org/dsdale24/pyqt5
-
刚刚进行了新安装。 Spyder 不会在 Windows 中从 cmd 打开,但它会在 Anaconda Prompt 和 MingW Git Bash 中打开。这曾经在 cmd 中打开,现在它没有。 CAM-Gerlach 在这里说github.com/spyder-ide/spyder/issues/6934,因为我有 PyQt 5.9.X,它可能会导致问题。这就是cmd打不开的原因吗?
-
@BrianWiley,你说:
is there a reason it is on the Anaconda website here。 Anaconda.org 是一个公共网站,因此任何人都可以在那里上传包。特别是,dsdale24包非常非常古老,在 Anaconda(该公司)为其创建官方包之前。
标签: python-3.x dll anaconda pyqt5 spyder