Python Spyder重置 [英] Python Spyder reset

查看:19
本文介绍了Python Spyder重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是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:Python27libsite-packagesspyderlibspyder.py", line 1547, in main
    mainwindow = run_spyder(app, options)
  File "C:Python27libsite-packagesspyderlibspyder.py", line 1472, in run_spyder
    main.setup()
  File "C:Python27libsite-packagesspyderlibspyder.py", line 555, in setup
    multithreaded=self.multithreaded)
  File "C:Python27libsite-packagesspyderlibpluginsconsole.py", line 54, in __init__
    light_background=light_background)
  File "C:Python27libsite-packagesspyderlibwidgetsinternalshell.py", line 101, in __init__
    debug, profile)
  File "C:Python27libsite-packagesspyderlibwidgetsshell.py", line 698, in __init__
    ShellBaseWidget.__init__(self, parent, history_filename, debug, profile)
  File "C:Python27libsite-packagesspyderlibwidgetsshell.py", line 61, in __init__
    self.history = self.load_history()
  File "C:Python27libsite-packagesspyderlibwidgetsshell.py", line 500, in load_history
    if rawhistory[1] != self.INITHISTORY[1]:
IndexError: list index out of range

我不擅长这些东西,所以我可能遗漏了一些非常明显的东西,或者做了一些非常愚蠢的事情。

我想知道是否还有其他人遇到了类似的问题,或者只是给出了一些建议,比如应该怎么做,如何进行"重置",或者其他建议。

提前谢谢您

推荐答案

python不在PATH中搜索spyder,例如:

c:somedir> python some_file

此处python尝试读取c:somedirsome_file文件,即在当前目录中查找some_file文件。

c:somedir> python another_dirsome_file

此处python尝试读取c:somediranother_dirsome_file文件,即在another_dir目录中查找some_file文件。

c:somedir> python C:path	osome_file

此处python尝试读取C:path osome_file文件,即它在C:path o目录中查找。


如果文档显示Run:python spyder --reset,则假定您位于spyder脚本所在的目录中。它既可以在源代码签出scripts目录中运行(如果您希望在不安装的情况下运行它),也可以从安装程序放置脚本的任何目录中运行。

安装过程应创建spyderspyder.bat文件。如果PATH中的spyder.bat,则可以将其运行为:

c:anydir> spyder

因此,您可以尝试:

而不是python spyder --reset
c:anydir> spyder --reset

回溯显示,第一个执行的函数是, source code for the spyder script确认,因此您可以运行:

python -c "from spyderlib.spyder import main; main()" --reset

这篇关于Python Spyder重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆