几个月前,我在我的Windows7笔记本电脑上安装了Python3.4,作为蟒蛇(https://www.continuum.io/downloads)的一部分。我的安装包括Spyder IDE,并且我已经成功地使用了Spyder for Python编程。
然而,从昨天开始,我就无法打开Spyder了。我通常通过开始菜单打开Spyder,但现在,当我尝试单击开始菜单中的Spyder图标时,我没有得到任何响应。然后,我尝试直接转到Anaconda安装目录的Scripts文件夹中的spyder.exe文件。当我第一次点击它时,下面的消息迅速闪现,然后消失了:
Traceback (most recent call last):
File "C:\Users\Aniket\Anaconda3\Scripts\spyder-script.py". line 2, in <module>
start_app.main()
File "C:\Users\Aniket\Anaconda3\lib\site-packages\spyderlib\start_app.py", line 114, in main
from spyderlib import spyder
File "C:\Users\Aniket\Anaconda3\lib\site-packages\spyderlib\spyder.py", line 100 in <module>
File "C:\Users\Aniket\Anaconda3\lib\site-packages\spyderlib\qt\QtSvg.py", line 10 in <module>
from PyQt4.QtSvg import * # analysis:ignore
ImportError:DLL load failed: The specified module could not be found我再次双击Spyder.exe,这一次收到了以下消息:
kfile.py", line 146 in lock
symlinke(str(os.getpid()), self.name)
File "C:\Users\Aniket\Anaconda3\lib\site-packages\spyderlib\utils\external\lockfile.py", line 87, in symlink
os.rmdir(newlinkname)
OSError: [WinError 145] The directory is not empty: 'C:\\Users\\Aniket\\.spyder2-py3\\spyder.lock.1459432906109.newlink'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Aniket\Anaconda3\Scripts\spyder-script.py". line 2, in <module>
start_app.main()
File "C:\Users\Aniket\Anaconda3\lib\site-packages\spyderlib\start_app.py", line 106, in main
from spyderlib import spyder
File "C:\Users\Aniket\Anaconda3\lib\site-packages\spyderlib\spyder.py", line 100 in <module>
File "C:\Users\Aniket\Anaconda3\lib\site-packages\spyderlib\qt\QtSvg.py", line 10 in <module>
from PyQt4.QtSvg import * # analysis:ignore
ImportError:DLL load failed: The specified module could not be found这两条消息都闪现得非常快,然后消失了--当它们出现时,我通过快速按Print Screen来捕捉到它们。我不清楚这些错误消息暗示了什么,也不清楚是什么导致了这种情况。可能是我在某个函数运行时关闭了Spyder,或者Spyder崩溃并导致了一些持续的错误。有人知道我怎么解决这个问题吗?
发布于 2016-10-29 01:37:13
我也遇到过类似的Spyder 2无法启动的问题。我的安装是蟒蛇的一部分,安装在Win7 64位操作系统上。我尝试了这里列出的所有解决方案和here,但它们对我都不起作用。在命令行中,我在尝试重置spyder时遇到以下错误:
U:\>python -c "from spyderlib.spyder import main; main()" --reset
Traceback (most recent call last):
File "C:\Temp\pApps\Anaconda3\lib\site-packages\spyderlib\qt\__init__.py", line 48, in <module> from PySide import __version__ # analysis:ignore
ImportError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Temp\pApps\Anaconda3\lib\site-packages\spyderlib\requirements.py", line 40, in check_qt from spyderlib import qt File "C:\Temp\pApps\Anaconda3\lib\site-packages\spyderlib\qt\__init__.py", line 50, in <module>
raise ImportError("Spyder requires PySide or PyQt to be installed")
ImportError: Spyder requires PySide or PyQt to be installed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Temp\pApps\Anaconda3\lib\site-packages\spyderlib\spyder.py", line 48, in <module> requirements.check_qt()
File "C:\Temp\pApps\Anaconda3\lib\site-packages\spyderlib\requirements.py", line 50, in check_qt % (qt_infos['pyqt']+qt_infos['pyside']))
File "C:\Temp\pApps\Anaconda3\lib\site-packages\spyderlib\requirements.py", line 25, in show_warning
raise RuntimeError(message)
RuntimeError: Please check Spyder installation requirements:
PyQt4 4.6+ (or PySide 1.2.0+) is required.令我惊讶的是,spyder直到昨天都工作得很好,而我昨天刚刚做了一个完整的更新,如下所示:
conda update --all所以我今天再次更新了spyder,更新了以下内容:
conda update spyder并向我提交了以下一揽子计划:
The following packages will be UPDATED:
spyder: 2.3.7-py35_3 None://None/<unknown> --> 2.3.8-py35_1
spyder-app: 2.3.7-py35_0 --> 2.3.8-py35_0
The following packages will be DOWNGRADED due to dependency conflicts:
matplotlib: 1.5.3-np111py35_1 --> 1.5.1-np111py35_0
pyqt: 5.6.0-py35_0 --> 4.11.4-py35_7
qt: 5.6.0-vc14_0 [vc14] --> 4.8.7-vc14_9
[vc14]
qtconsole: 4.2.1-py35_2 --> 4.2.1-py35_0在更新之后,spyder现在工作得很好。本质上,我的问题是由于依赖冲突造成的。
发布于 2016-09-15 02:27:44
几天前遇到了和你完全一样的问题,重新安装不起作用,所以我去了:
C:\Users\'YourName'\\.spyder2-py3删除每个spyder,锁定其中的文件/文件夹,然后重新启动。
发布于 2017-02-28 18:53:07
我知道这是一个老帖子,但是刚刚遇到了同样的问题,https://github.com/spyder-ide/spyder/issues/3005的答案对我很有效
我的问题似乎是spyder的状态仍在运行,所以无法打开。要解决此问题,您需要在Users\目录中查找名为.spyder2的目录,然后找到名为spyder.lock的文件并将其删除。
https://stackoverflow.com/questions/36337059
复制相似问题