0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Spyderが起動しない場合の対処法(一例)

Last updated at Posted at 2021-04-23

#環境
Windows10
Anaconda3(2020.03)

#発生した障害
Anacondaを更新しようと conda update --all を実行した後、Spyderが起動しなくなりました。
マウスポインタがぐるぐる回るけど、すぐに戻ってそのままうんともすんとも言わず・・・

#対処
##対処1
以下の記事を参考にspyder.lockフォルダを削除しても改善しませんでした。

##対処2
管理者権限のプロンプトでspyderを実行しても以下のメッセージが出て起動できません。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/584833/308a7c60-1ad3-a78e-2f4c-20087468e220.png)
Traceback (most recent call last):
File "C:\Users\007033\Anaconda3\Scripts\spyder-script.py", line 10, in 
sys.exit(main())
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\app\start.py", line 210, in main
from spyder.app import mainwindow
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 119, in 
from spyder.utils.environ import WinUserEnvDialog
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\utils\environ.py", line 19, in 
from spyder.plugins.variableexplorer.widgets.collectionseditor import (
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer\widgets\collectionseditor.py", line 57, in 
from spyder.plugins.variableexplorer.widgets.collectionsdelegate import (
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer\widgets\collectionsdelegate.py", line 31, in 
from spyder.plugins.variableexplorer.widgets.objectexplorer.attribute_model \
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer\widgets\objectexplorer\__init__.py", line 23, in 
from .objectexplorer import ObjectExplorer
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\variableexplorer\widgets\objectexplorer\objectexplorer.py", line 33, in 
from spyder.plugins.editor.widgets.codeeditor import CodeEditor
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\editor\widgets\codeeditor.py", line 70, in 
from spyder.plugins.editor.panels import (ClassFunctionDropdown,
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\editor\panels\__init__.py", line 13, in 
from .codefolding import FoldingPanel
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\editor\panels\codefolding.py", line 32, in 
from spyder.plugins.editor.panels.utils import (
File "C:\Users\007033\Anaconda3\lib\site-packages\spyder\plugins\editor\panels\utils.py", line 15, in 
import textdistance
ModuleNotFoundError: No module named 'textdistance'

エラーメッセージの一番下の行にtextdistanceのモジュールがないとメッセージが出ています。
ということで以下を実行してtextdistanceをインストールします。

conda install textdistance

textdistanceについて調べると、文字列を比較してどれだけ離れているかを調べるためのライブラリのようです。
https://pypi.org/project/textdistance/
https://pycarnival.com/textdistance/

これが完了したら無事に起動することができました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?