我使用的是随Spyder提供的python(x,y)。昨天,Spyder崩溃了,我不知道该怎么解决它。我卸载了python(x,y),然后重新安装,仍然存在同样的问题。
如果我尝试打开Spyder,我会得到这样的消息:
Spyder crashed during last session
If Spyder does not start at all and before submitting a bug report, please try to reset setting to defaults by running Spyder with the command line option '--reset:
python spyder --reset当然,我试着做上面的事情,但似乎没有Spyder在我的道路上。当我试着把
python spyder --reset在我的命令提示符窗口中,我收到以下错误消息:
python: can't open file 'spyder': [Errno 2] No such file or directory我尝试过将spyder添加到path中,但都失败了。我应该如何将Spyder添加到path中?
我在32位系统上使用Windows Vista。
我的Spyder崩溃报告是这样的:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 1547, in main
mainwindow = run_spyder(app, options)
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 1472, in run_spyder
main.setup()
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 555, in setup
multithreaded=self.multithreaded)
File "C:\Python27\lib\site-packages\spyderlib\plugins\console.py", line 54, in __init__
light_background=light_background)
File "C:\Python27\lib\site-packages\spyderlib\widgets\internalshell.py", line 101, in __init__
debug, profile)
File "C:\Python27\lib\site-packages\spyderlib\widgets\shell.py", line 698, in __init__
ShellBaseWidget.__init__(self, parent, history_filename, debug, profile)
File "C:\Python27\lib\site-packages\spyderlib\widgets\shell.py", line 61, in __init__
self.history = self.load_history()
File "C:\Python27\lib\site-packages\spyderlib\widgets\shell.py", line 500, in load_history
if rawhistory[1] != self.INITHISTORY[1]:
IndexError: list index out of range我在这方面做得很糟糕,所以我可能会遗漏一些显而易见的东西,或者做一些非常愚蠢的事情。
我想知道是否有其他人遇到了类似的问题,或者只是给出了一些建议,比如该怎么做,如何做这个“重置”的事情,或者其他的建议。
提前谢谢你
发布于 2012-03-17 14:21:06
python不会在PATH中搜索spyder,例如:
c:\some\dir> python some_file这里,python试图读取c:\some\dir\some_file文件,即它在当前目录中查找some_file文件。
c:\some\dir> python another_dir\some_file这里,python试图读取c:\some\dir\another_dir\some_file文件,即它在another_dir目录中查找some_file文件。
c:\some\dir> python C:\path\to\some_file这里,python试图读取C:\path\to\some_file文件,即它在C:\path\to目录中查找。
如果文档显示run:python spyder --reset,则假定您位于spyder脚本所在的目录中。它既可以从源码签出scripts目录(如果您希望在不安装的情况下运行它),也可以从安装放入脚本的任何目录中运行。
安装过程应创建spyder或spyder.bat文件。如果你的PATH中有spyder.bat,那么你可以这样运行它:
c:\any\dir> spyder所以你可以试着不使用python spyder --reset:
c:\any\dir> spyder --reset回溯显示第一个执行的函数是spyderlib.spyder.main(),source code for the spyder script对此进行了确认,因此您可以运行:
python -c "from spyderlib.spyder import main; main()" --reset发布于 2017-12-07 13:00:51
别担心,这是很容易重置spyder。对于windows10用户,你们都需要在'Cortana‘中输入' spyder’,然后你可以在应用程序类别中看到类似‘重置spyder设置’的东西,只需点击它,一些黑屏就会打开,你的问题就会得到解决。现在你可以打开你的spyder了。
发布于 2015-11-29 21:34:27
我在windows中遇到了这个问题,通过更新spyder解决了这个问题。
pip install -U spyderhttps://stackoverflow.com/questions/9747158
复制相似问题