20

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 をパスに追加するにはどうすればよいですか?

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

私はこのようなことでひどいので、完全に明白な何かを見逃しているか、本当にばかげたことをしているかもしれません.

他の誰かが同様の問題に遭遇したかどうか、または何をすべきか、この「リセット」を行う方法、または他のアドバイスについて提案できるかどうか疑問に思っています。

前もって感謝します

4

10 に答える 10

20

pythonspyder例で検索しませんPATH:

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ファイルを作成する必要があります。spyder.batあなたの場合は、次のPATHように実行できます。

c:\any\dir> spyder

したがって、代わりに次のpython spyder --resetことを試すことができます。

c:\any\dir> spyder --reset

トレースバックは、最初に実行された関数がspyderlib.spyder.main()で あることを示しています。スクリプトのソース コードはspyderそれを確認しているため、次を実行できます。

python -c "from spyderlib.spyder import main; main()" --reset
于 2012-03-17T06:21:06.457 に答える
5

Windowsでこの問題があり、スパイダーを更新することで解決しました

pip install -U spyder
于 2015-11-29T13:34:27.473 に答える
3

ほとんどのユーザーのスパイダー設定は、ユーザー フォルダー .Spyder ファイル名にあります。削除することで、IDE を再起動できるようになり、新しい .Spyder ディレクトリが作成されます。

于 2016-08-09T11:35:33.447 に答える
1

winpython の初心者の場合、私も spyder/spyder-reset not started というこの問題に直面しました。そして最後に、これはそれがどのように始まったかです:

開いたコマンドラインは次の場所に移動しました:

D:\manas\mak\crap\WinPython-64bit-3.4.4.2\scripts

入力したspyder.bat

そしてそれはスパイダーを開いた。

おそらく、スパイダー アイコンをクリックして読み込みを妨げているときに、環境変数が .exe にスタックしている可能性があります。

于 2016-04-21T15:39:19.130 に答える
-1

前の回答に従ってspyder.batを検索し、そのディレクトリに変更した後、python spyder --resetコマンドを実行しました。

C:\WinPython-32bit-2.7.3.3\python-2.7.3>cd scripts
C:\WinPython-32bit-2.7.3.3\python-2.7.3\Scripts>python spyder --reset
于 2013-02-06T02:17:16.377 に答える