在 Ubuntu18 上打开 Spyder3 时缺少依赖项导致 Keyring 错误?
Posted
技术标签:
【中文标题】在 Ubuntu18 上打开 Spyder3 时缺少依赖项导致 Keyring 错误?【英文标题】:Missing dependencies causing Keyring error when opening Spyder3 on Ubuntu18? 【发布时间】:2019-04-09 09:30:26 【问题描述】:我对编程等还很陌生。我正在尝试使用 Spyder3,但我不断收到此错误(如下)。我使用的是 Geforce 1080ti,Ubuntu 18.04.01,python3.3.6,python2 没有安装。我试过 $ pip3 install keyring,它现在已经安装但仍然收到错误。
$ spyder3
Error initializing plugin EntryPoint('Windows (alt)', 'keyrings.alt.Windows', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
File "/home/usr/.local/lib/python3.6/site-packages/keyring/backend.py", line 163, in _load_plugins
init_func = ep.load()
File "/home/usr/.local/lib/python3.6/site-packages/entrypoints.py", line 77, in load
mod = import_module(self.module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/keyrings/alt/Windows.py", line 9, in <module>
from . import file_base
File "/usr/lib/python3/dist-packages/keyrings/alt/file_base.py", line 13, in <module>
from keyring.util.escape import escape as escape_for_ini
ModuleNotFoundError: No module named 'keyring.util.escape'
Error initializing plugin EntryPoint('file', 'keyrings.alt.file', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
File "/home/usr/.local/lib/python3.6/site-packages/keyring/backend.py", line 163, in _load_plugins
init_func = ep.load()
File "/home/usr/.local/lib/python3.6/site-packages/entrypoints.py", line 77, in load
mod = import_module(self.module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/keyrings/alt/file.py", line 11, in <module>
from keyring.util.escape import escape as escape_for_ini
ModuleNotFoundError: No module named 'keyring.util.escape'
Error initializing plugin EntryPoint('pyfs', 'keyrings.alt.pyfs', None, Distribution('keyrings.alt', '3.0')).
Traceback (most recent call last):
File "/home/usr/.local/lib/python3.6/site-packages/keyring/backend.py", line 163, in _load_plugins
init_func = ep.load()
File "/home/usr/.local/lib/python3.6/site-packages/entrypoints.py", line 77, in load
mod = import_module(self.module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/keyrings/alt/pyfs.py", line 8, in <module>
from keyring.util.escape import escape as escape_for_ini
ModuleNotFoundError: No module named 'keyring.util.escape'
【问题讨论】:
(这里是 Spyder 维护者)您说:“我对编程等还很陌生”。然后,请帮自己一个忙,下载并安装Anaconda,它是最新的 Spyder 附带的(不像最新的 Ubuntu,它现在有 10 个月大的版本),它非常容易安装,并且所有这些问题都得到了解决出来给你。顺便说一句,我们警告here 和here。 推荐 Anaconda 非常好,但它带来了很多需要学习的额外内容和大量自定义系统的默认 Python 环境的包袱。 【参考方案1】:修复它:
pip3 install --upgrade keyrings.alt
【讨论】:
你怎么知道的? 我在升级其版本后尝试使用pip3
时遇到了完全相同的错误。这个解决方案也为我解决了这个问题。
...为什么这是必要的?您找到更多信息了吗?
我需要为pip
而不是pip3
这样做。不过真的不明白为什么。以上是关于在 Ubuntu18 上打开 Spyder3 时缺少依赖项导致 Keyring 错误?的主要内容,如果未能解决你的问题,请参考以下文章
Mongodb Compass 无法在 Ubuntu 18.10 中打开
Android SDK Manager 无法在 Ubuntu 18.04 上的 Eclipse 中打开