V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yazoox
V2EX  ›  Neovim

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

  •  
  •   yazoox · 2021-03-13 17:06:27 +08:00 · 2034 次点击
    这是一个创建于 1349 天前的主题,其中的信息可能已经有所发展或是发生改变。
    ## 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
    
    yazoox
        1
    yazoox  
    OP
       2021-03-13 17:38:15 +08:00
    update:
    python2 & python3 的问题解决了。主要就是 python 和 pip 各版本的安装问题。

    不过,ruby 那个,不知道是怎么回事儿。一直找不到 neovim-ruby-host 。明明 gem install neovim 已经成功了,还是找不到...... 全盘搜索都没有
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3107 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 12:45 · PVG 20:45 · LAX 04:45 · JFK 07:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.