为什么我安装不上去 neovim for Python ? ruby 也配置不好,我已经升级到最新了呢。

2021-03-13 17:06:27 +08:00
 yazoox
## Python 2 provider (optional)
  - INFO: Using: g:python_host_prog = "/usr/bin/python"
  - INFO: Executable: /usr/bin/python
  - ERROR: Command error (job=7, exit code 1): `/usr/bin/python -c 'import sys; sys.path.remove(""); import neovim; print(neovim.__file__)'` (in '/Users/yazoox’)
    Output: Traceback (most recent call last):  File "<string>", line 1, in <module>ImportError: No module named neovim
    Stderr: Traceback (most recent call last):  File "<string>", line 1, in <module>ImportError: No module named neovim
  - INFO: Python version: 2.7.16
  - INFO: pynvim version: unable to load neovim Python module
  - ERROR: pynvim is not installed.
    Error: unable to load neovim Python module
    - ADVICE:
      - Run in shell: pip install pynvim

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/bin/python3"
  - INFO: Executable: /usr/bin/python3
  - ERROR: Command error (job=10, exit code 1): `'/usr/bin/python3' -c 'import sys; sys.path.remove(""); import neovim; print(neovim.__file__)'` (in '/Users/yazoox)
    Output: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
    Stderr: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
  - INFO: Python version: 3.8.2
  - INFO: pynvim version: unable to load neovim Python module
  - ERROR: pynvim is not installed.
    Error: unable to load neovim Python module
    - ADVICE:
      - Run in shell: pip3 install pynvim

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
  - INFO: Host: /Users/yazoox/.rvm/rubies/ruby-2.4.1/bin/ruby
  - WARNING: Gem "neovim" is out-of-date. Installed: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16], latest: 0.8.0
    - ADVICE:
      - Run in shell: gem update neovim

我已经安装了 python2 & 3. pip install neovim & pip3 install neovim, nvim +checkhealth,还是报这个错误呢。

-> % pip install neovim
Collecting neovim
  Downloading neovim-0.3.1.tar.gz (804 bytes)
Requirement already satisfied: pynvim>=0.3.1 in ./Library/Python/3.9/lib/python/site-packages (from neovim) (0.4.2)
Requirement already satisfied: msgpack>=0.5.0 in ./Library/Python/3.9/lib/python/site-packages (from pynvim>=0.3.1->neovim) (1.0.2)
Requirement already satisfied: greenlet in ./Library/Python/3.9/lib/python/site-packages (from pynvim>=0.3.1->neovim) (1.0.0)
Building wheels for collected packages: neovim
  Building wheel for neovim (setup.py) ... done
  Created wheel for neovim: filename=neovim-0.3.1-py3-none-any.whl size=1079 sha256=e9e13d9b6fd2377de42eb095a6147cf136e2479322716fd02e045cf95fee73ea
  Stored in directory: /Users/yazoox/Library/Caches/pip/wheels/c0/6c/51/03b6d6c831651e93636d569f9f7996d616f8efc9410d25d17c
Successfully built neovim
Installing collected packages: neovim
Successfully installed neovim-0.3.1


-> % pip3 install neovim
Requirement already satisfied: neovim in /usr/local/lib/python3.9/site-packages (0.3.1)
Requirement already satisfied: pynvim>=0.3.1 in ./Library/Python/3.9/lib/python/site-packages (from neovim) (0.4.2)
Requirement already satisfied: msgpack>=0.5.0 in ./Library/Python/3.9/lib/python/site-packages (from pynvim>=0.3.1->neovim) (1.0.2)
Requirement already satisfied: greenlet in ./Library/Python/3.9/lib/python/site-packages (from pynvim>=0.3.1->neovim) (1.0.0)

-> % gem update neovim
Updating installed gems
Nothing to update

-> % rvm system do neovim-ruby-host
/Users/yazoox/.rvm/scripts/set: line 19: exec: neovim-ruby-host: not found

谷歌了好半天,各种方法也试过了,没有解决。上来问一下大家,有没有碰到过。

哎,这 python 的版本管理,是真的闹心......

谢谢!

p.s.

let g:python_host_prog  = '/usr/bin/python'
let g:python3_host_prog = '/usr/bin/python3'
let g:ruby_host_prog    = '/Users/yazoox/.rvm/rubies/ruby-2.4.1/bin/ruby'

编辑一下,刚才把 python3 的路径改成和了 /usr/local/bin/python

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
  - INFO: Executable: /usr/local/bin/python3
  - INFO: Python version: 3.9.1
  - INFO: pynvim version: 0.4.2 (outdated; from ~/Library/Python/3.9/lib/python/site-packages/neovim)
  - WARNING: Latest pynvim is NOT installed: 0.4.3
2066 次点击
所在节点    Neovim
1 条回复
yazoox
2021-03-13 17:38:15 +08:00
update:
python2 & python3 的问题解决了。主要就是 python 和 pip 各版本的安装问题。

不过,ruby 那个,不知道是怎么回事儿。一直找不到 neovim-ruby-host 。明明 gem install neovim 已经成功了,还是找不到...... 全盘搜索都没有

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/761334

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX