mhinz / neovim-remote

:ok_hand: Support for --remote and friends.
MIT License
1.75k stars 83 forks source link

Installation with --target option fails #98

Closed TyOverby closed 5 years ago

TyOverby commented 5 years ago

When attempting to install with the --target option provided, I get the following error message:

$ pip3 install --target=./nvr-2.1.3/ neovim-remote==2.1.3
Collecting neovim-remote==2.1.3
Collecting setuptools (from neovim-remote==2.1.3)
  Using cached https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl
Collecting pynvim (from neovim-remote==2.1.3)
Collecting psutil (from neovim-remote==2.1.3)
Collecting msgpack>=0.5.0 (from pynvim->neovim-remote==2.1.3)
  Using cached https://files.pythonhosted.org/packages/81/d7/57718f80633f39f0bf0254abf87e4344e42e2d1e2da8ec22ae5beeadd441/msgpack-0.6.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting greenlet (from pynvim->neovim-remote==2.1.3)
  Using cached https://files.pythonhosted.org/packages/bf/45/142141aa47e01a5779f0fa5a53b81f8379ce8f2b1cd13df7d2f1d751ae42/greenlet-0.4.15-cp36-cp36m-manylinux1_x86_64.whl
twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
smart-open 1.7.1 requires bz2file, which is not installed.
catboost 0.11.2 requires enum34, which is not installed.
luigi 2.8.2 has requirement python-daemon<2.2.0, but you'll have python-daemon 2.2.0 which is incompatible.
Installing collected packages: setuptools, msgpack, greenlet, pynvim, psutil, neovim-remote
Successfully installed greenlet-0.4.15 msgpack-0.6.0 neovim-remote-2.1.3 psutil-5.4.8 pynvim-0.3.1 setuptools-40.6.3

Trying to run nvr anyway gives me this:

$ ./nvr-2.1.3/bin/nvr
Traceback (most recent call last):
  File "./nvr-2.1.3/bin/nvr", line 7, in <module>
    from nvr.nvr import main
ModuleNotFoundError: No module named 'nvr'
mhinz commented 5 years ago

This seems more like an issue with your environment than with this package.

I don't use Python a lot, but I'd guess that when you install a package to a random directory, how would the Python environment know about that? Maybe you just have to set $PYTHONPATH first.

❯ python3 -c 'import sys; print(*sys.path, sep="\n")'

/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python37.zip
/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7
/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload
/usr/local/lib/python3.7/site-packages
/data/github/mhinz/neovim-remote master
❯ PYTHONPATH=./nvr-2.1.3 python3 -c 'import sys; print(*sys.path, sep="\n")'

/data/github/mhinz/neovim-remote/nvr-2.1.3
/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python37.zip
/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7
/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload
/usr/local/lib/python3.7/site-packages
TyOverby commented 5 years ago

Oh nice, that appears to have fixed it; thanks!