Spyder 需要 jedi>=0.10 但安装 jedi==0.90

Spyder 需要 jedi>=0.10 但安装 jedi==0.90

(在 ubuntu 17.04 中工作,不知道是否有任何区别)在 pip3 中遇到此问题后:https://github.com/pypa/pip/issues/4216我使用开发10.0.0 版本。然后,在升级所有软件包之后 - 我发现我无法打开 spyder,因为它需要 jedi>= 10.0:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/spyder/app/mainwindow.py", line 2999, in main
    mainwindow = run_spyder(app, options, args)
  File "/usr/local/lib/python3.5/dist-packages/spyder/app/mainwindow.py", line 2901, in run_spyder
    main.setup()
  File "/usr/local/lib/python3.5/dist-packages/spyder/app/mainwindow.py", line 824, in setup
    self.findinfiles = FindInFiles(self)
  File "/usr/local/lib/python3.5/dist-packages/spyder/plugins/findinfiles.py", line 52, in __init__
    include = self.include_patterns()
  File "/usr/local/lib/python3.5/dist-packages/spyder/plugins/findinfiles.py", line 105, in include_patterns
    for ext in get_edit_extensions():
  File "/usr/local/lib/python3.5/dist-packages/spyder/config/utils.py", line 140, in get_edit_extensions
    edit_filetypes = get_edit_filetypes()
  File "/usr/local/lib/python3.5/dist-packages/spyder/config/utils.py", line 118, in get_edit_filetypes
    pygments_exts = _get_pygments_extensions()
  File "/usr/local/lib/python3.5/dist-packages/spyder/config/utils.py", line 85, in _get_pygments_extensions
    for lx in lexers.get_all_lexers():
  File "/usr/local/lib/python3.5/dist-packages/pygments/lexers/__init__.py", line 53, in get_all_lexers
    for lexer in find_plugin_lexers():
  File "/usr/local/lib/python3.5/dist-packages/pygments/plugin.py", line 53, in find_plugin_lexers
    yield entrypoint.load()
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2301, in load
    self.require(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2324, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 859, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (jedi 0.9.0 (/usr/local/lib/python3.5/dist-packages), Requirement.parse('jedi>=0.10'))

然后,如果我将 jedi 升级到任何版本 >= 0.10,Spyder 就会弹出一条消息说:You have missing dependencies! jedi =0.9.0: 0.10.2 (NOK)但它打开了,没有 ipython。

我接下来该怎么做?spyder 中的内部控制台告诉我:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'banner'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/qtconsole/base_frontend_mixin.py", line 163, in _dispatch
    handler(msg)
  File "/usr/local/lib/python3.5/dist-packages/qtconsole/jupyter_widget.py", line 296, in _handle_kernel_info_reply
    super(JupyterWidget, self)._started_channels()
  File "/usr/local/lib/python3.5/dist-packages/qtconsole/frontend_widget.py", line 617, in _started_channels
    self.reset(clear=True)
  File "/usr/local/lib/python3.5/dist-packages/qtconsole/frontend_widget.py", line 661, in reset
    self._append_plain_text(self.banner)
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "/usr/local/lib/python3.5/dist-packages/traitlets/traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "/usr/local/lib/python3.5/dist-packages/spyder/widgets/ipythonconsole/shell.py", line 280, in _banner_default
    return self.long_banner()
  File "/usr/local/lib/python3.5/dist-packages/spyder/widgets/ipythonconsole/shell.py", line 91, in long_banner
    from IPython.core.usage import quick_guide
ImportError: cannot import name 'quick_guide'

我没有找到任何资源来处理这个问题。

答案1

错误...

ImportError: cannot import name 'quick_guide'

...据报道https://github.com/spyder-ide/spyder/issues/4170并固定在https://github.com/spyder-ide/spyder/pull/4208并发布于版本3.1.4

类型

pip3 install --upgrade spyder

来解决此问题。

相关内容