Closed Manu-sh closed 6 years ago
You should test pythonx import neovim
in Vim command line.
It seems does not work.
It is not vim-hug-neovim-rpc problem.
I have tested pythonx import neovim
in Manjaro Linux. It does work.
I have typed :pythonx import neovim
and this is the output:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/.local/lib/python3.6/site-packages/neovim/__init__.py", line 11, in <module>
from .msgpack_rpc import (ErrorResponse, child_session, socket_session,
File "/home/user/.local/lib/python3.6/site-packages/neovim/msgpack_rpc/__init__.py", line 10, in <module>
from .session import ErrorResponse, Session
File "/home/user/.local/lib/python3.6/site-packages/neovim/msgpack_rpc/session.py", line 6, in <module>
import greenlet
ImportError: /usr/lib/python3.6/site-packages/greenlet.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyExc_ValueError
so i should close the issue ?
Yes.
You need to reinstall greenlet
library.
yes i have reinstalled greenlet
library and now work properly (thx)
I'm having the same issue, but with /usr/lib/python3.7. Reinstalling greenlet did nothing to help. Everything else is the same as this post.
Same here
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/neovim/__init__.py", line 11, in <module>
from .msgpack_rpc import (ErrorResponse, child_session, socket_session,
File "/usr/lib/python3/dist-packages/neovim/msgpack_rpc/__init__.py", line 10, in <module>
from .session import ErrorResponse, Session
File "/usr/lib/python3/dist-packages/neovim/msgpack_rpc/session.py", line 7, in <module>
import greenlet
ModuleNotFoundError: No module named 'greenlet'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/neovim/__init__.py", line 11, in <module>
from .msgpack_rpc import (ErrorResponse, child_session, socket_session,
File "/usr/lib/python3/dist-packages/neovim/msgpack_rpc/__init__.py", line 10, in <module>
from .session import ErrorResponse, Session
File "/usr/lib/python3/dist-packages/neovim/msgpack_rpc/session.py", line 7, in <module>
import greenlet
ModuleNotFoundError: No module named 'greenlet'
For those who found this ticket trying to solve this kind of crash:
Don't use the pip
version of greenlet
on Arch.
by installing sudo pacman -S python-greenlet
it works, but when I use it inside virtualenv it fails with above errors
by installing
sudo pacman -S python-greenlet
it works, but when I use it inside virtualenv it fails with above errors
While pacman does install greenlet
, it only does so in the same place as pip
would. Loading a virtualenv discards packages such as greenlet
so you have to link the Arch version into your virtualenv as well.
While pacman does install
greenlet
, it only does so in the same place aspip
would. Loading a virtualenv discards packages such asgreenlet
so you have to link the Arch version into your virtualenv as well.
Fantastic! Cheers, this worked perfectly, I was actually not aware of this problem, just starting out with virtual envs tbh.
For anyone still needing this solution install your virtual env (depending on provider) in similar fashion:
mkvirtualenv --system-site-packages <env-name>
--system-site-packages
flag enables system wide installed packages, which in our case is python-greenlet
by direct reinstalling greenlet
library or installing sudo pacman -S python-greenlet
are not worked for me because both use the precompiled wheel/binary.
pip3 uninstall pynvim
cd ~/.local/lib/python3.7/site-packages/
rm -r greenlet-0.4.15-py3.7.egg-info greenlet.cpython-37m-x86_64-linux-gnu.so
pip3 install --user --no-binary :all: pynvim
Reference https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-no-binary https://www.archlinux.org/packages/community/x86_64/python-greenlet/files/ https://bbs.archlinux.org/viewtopic.php?id=232873
@anbuksv Thank you for your answer, my question is the same as yours. But I don't have this file greenlet-0.4.15-py3.7.egg-info
, I do rm -rf greenlet-0.4.15.dist-info
, and deoplete work. But I do :echo neovim_rpc#serveraddr()
, I get /tmp/veSlECq/2
. @roxma
Same issue on macos mojave
@korsmakolnikov Please read this. https://github.com/roxma/vim-hug-neovim-rpc/issues/36
Im on Vim 8.1:
Following statements are true:
neovim seem to be installed correctly:
When i open vim i get this error:
As cfg i have: