在Conda更新后打开Spyder时出现问题

2022-04-05 00:00:00 python spyder

问题描述

我一直在用Jupyter编写代码,主要是因为教授们的偏好,所以当我最近打开Sypder使用时,它想让我更新它,我通过Conda更新了它,现在当我试图打开它时,它给了我这个。我试着强迫Sypder回到以前的版本,但没有成功。有人能帮忙吗??

Traceback (most recent call last):
File "C:Userscyrraanaconda3Scriptsspyder-script.py", line 10, in 
sys.exit(main())
File "C:Userscyrraanaconda3libsite-packagesspyderappstart.py", line 210, in main
from spyder.app import mainwindow
File "C:Userscyrraanaconda3libsite-packagesspyderappmainwindow.py", line 119, in 
from spyder.utils.environ import WinUserEnvDialog
File "C:Userscyrraanaconda3libsite-packagesspyderutilsenviron.py", line 19, in 
from spyder.plugins.variableexplorer.widgets.collectionseditor import (
File "C:Userscyrraanaconda3libsite-packagesspyderpluginsvariableexplorerwidgetscollectionseditor.py", line 57, in 
from spyder.plugins.variableexplorer.widgets.collectionsdelegate import (
File "C:Userscyrraanaconda3libsite-packagesspyderpluginsvariableexplorerwidgetscollectionsdelegate.py", line 31, in 
from spyder.plugins.variableexplorer.widgets.objectexplorer.attribute_model 
File "C:Userscyrraanaconda3libsite-packagesspyderpluginsvariableexplorerwidgetsobjectexplorer\__init__.py", line 23, in 
from .objectexplorer import ObjectExplorer
File "C:Userscyrraanaconda3libsite-packagesspyderpluginsvariableexplorerwidgetsobjectexplorerobjectexplorer.py", line 33, in 
from spyder.plugins.editor.widgets.codeeditor import CodeEditor
File "C:Userscyrraanaconda3libsite-packagesspyderpluginseditorwidgetscodeeditor.py", line 70, in 
from spyder.plugins.editor.panels import (ClassFunctionDropdown,
File "C:Userscyrraanaconda3libsite-packagesspyderpluginseditorpanels\__init__.py", line 13, in 
from .codefolding import FoldingPanel
File "C:Userscyrraanaconda3libsite-packagesspyderpluginseditorpanelscodefolding.py", line 32, in 
from spyder.plugins.editor.panels.utils import (
File "C:Userscyrraanaconda3libsite-packagesspyderpluginseditorpanelsutils.py", line 15, in 
import textdistance
ModuleNotFoundError: No module named 'textdistance'

谢谢!


解决方案

(Spyder Maintainer Here)此错误是由错误打包的Spyder版本引起的,但现在已修复。

若要获取修复程序,请打开Anaconda提示符并在此处运行

conda update spyder

如果不起作用,请运行

conda remove --force spyder
conda install spyder=4.2.1

这应该可以解决您的问题。

相关文章