Anaconda3 带有 jedi-vim、Manjaro linux、ImportError,无法导入“jedi”Python 模块

Anaconda3 带有 jedi-vim、Manjaro linux、ImportError,无法导入“jedi”Python 模块

我在使用 anaconda3 python 发行版和 jedi-vim 插件时遇到了这个奇怪的错误。以下是 :JediDebugInfo 的输出

#### Jedi-vim debug information

##### jedi-vim version

 - jedi-vim git version: 0.10.0-3-g4f2499e
 - jedi git submodule status:  005f69390c4b1a3b864e7373cfcbdaf95e65411d pythonx/jedi (v0.15.1)
 - parso git submodule status:  c0ace63a6905500e18d8ac06af1a0a9057e63498 pythonx/parso (v0.5.1)

##### Global Python

Using Python version 3 to access Jedi.
 - global sys.version: `3.7.4 (default, Jul 16 2019, 07:12:58), [GCC 9.1.0]`
 - global site module: `/home/<user>/anaconda3/lib/python3.7/site.py`
ERROR: could not import the "jedi" Python module: ImportError: /home/<user>/anaconda3/lib/python3.7/lib-dynload/_posix
subprocess.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _Py_write_noraise
  Traceback (most recent call last):
    File "/home/<user>/.vim/bundle/jedi-vim/pythonx/jedi_vim.py", line 112, in <module>
      import jedi
    File "/home/<user>/.vim/bundle/jedi-vim/pythonx/jedi/jedi/__init__.py", line 38, in <module>
      from jedi.api import Script, Interpreter, set_debug_function, \
    File "/home/<user>/.vim/bundle/jedi-vim/pythonx/jedi/jedi/api/__init__.py", line 16, in <module>
      import parso
    File "/home/<user>/.vim/bundle/jedi-vim/pythonx/parso/parso/__init__.py", line 41, in <module>
      from parso.parser import ParserSyntaxError
    File "/home/<user>/.vim/bundle/jedi-vim/pythonx/parso/parso/parser.py", line 26, in <module>
      from parso import tree
    File "/home/<user>/.vim/bundle/jedi-vim/pythonx/parso/parso/tree.py", line 3, in <module>
      from parso._compatibility import utf8_repr, encoding, py_version
    File "/home/<user>/.vim/bundle/jedi-vim/pythonx/parso/parso/_compatibility.py", line 6, in <module>
      import platform
    File "/home/<user>/anaconda3/lib/python3.7/platform.py", line 116, in <module>
      import sys, os, re, subprocess
    File "/home/<user>/anaconda3/lib/python3.7/subprocess.py", line 152, in <module>
      import _posixsubprocess

##### Settings

```
  omnifunc=python3complete#Complete
        Last set from /usr/share/vim/vim81/ftplugin/python.vim line 41
  completeopt=menuone,longest,preview
        Last set from /usr/share/vim/vimfiles/plugin/jedi.vim line 31
```

我已经运行命令:conda update --all对于 anaconda3 和:PluginUpdate对于 vim(我使用 Vundle 来安装 jedi-vim)。

相关内容