Spyder failed to launch in Anaconda after update (4.1.2)

两盒软妹~` 提交于 2020-05-08 18:51:58

问题


I have just updated Spyder to 4.1.2 and when I try to launch it, it now produces an error and fails to launch.

Output from conda list pylint How can I solve this?

Error:

Traceback (most recent call last):
File "/Users/name/opt/anaconda3/bin/spyder", line 11, in 
sys.exit(main())
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/app/start.py", line 205, in main
mainwindow.main()
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3734, in main
mainwindow = run_spyder(app, options, args)
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3590, in run_spyder
main.setup()
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 977, in setup
'spyder.plugins.{}'.format(plugin_name))
File "/Users/name/opt/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/plugins/pylint/__init__.py", line 14, in 
from .plugin import Pylint as PLUGIN_CLASS
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/plugins/pylint/plugin.py", line 29, in 
from spyder.plugins.pylint.confpage import PylintConfigPage
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/plugins/pylint/confpage.py", line 16, in 
from spyder.plugins.pylint.widgets.pylintgui import PylintWidget
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/plugins/pylint/widgets/pylintgui.py", line 37, in 
from spyder.plugins.pylint.utils import get_pylintrc_path
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/spyder/plugins/pylint/utils.py", line 16, in 
import pylint.config
File "/Users/name/opt/anaconda3/lib/python3.7/site-packages/pylint/config.py", line 54, in 
import toml
ModuleNotFoundError: No module named 'toml'

回答1:


This seems to be an error in the pylint package provided by the default channels. The dependency toml is currently missing in the package definition.

A quick workaround for now is to downgrade to the previous version:

conda install "pylint<2.5"

See also anaconda-issues/#11775.



来源:https://stackoverflow.com/questions/61529446/spyder-failed-to-launch-in-anaconda-after-update-4-1-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!