Closed HiPhish closed 1 year ago
Did you try the unreleased version? https://github.com/neovim/pynvim/issues/538 mentions an issue with imp
, which should be fixed by the next pynvim release.
Yes, the master branch fixes the second issue. Should I close this one?
Yes this has already been fixed by #534. Until released, you can install the master version:
pip install 'pynvim @ git+https://github.com/neovim/pynvim'
I can override the installation issue by passing the --break-system-packages
flag to pip. So the full command is
pip install --break-system-packages --user 'pynvim @ git+https://github.com/neovim/pynvim'
The name --break-system-packages
sounds scary but it won't break the system as long as --user
is used to install packages to the user's home directory instead of globally. It might break the user's personal configuration, but that can be solved by throwing away the Python files:
# Remove files manually, may leave residue files in ~/.local/bin
rm -rf ~/.local/include/python3.* ~/.local/lib/python3.*
This is good enough for me.
I just updated my system Python to 3.12 and I have two issues:
pynvim
cannot be installed outside of a venvUpdateRemotePlugins
PEP 688 introduces the concept of externally managed environments. The idea is to prevent users from messing up their system by installing packages which might conflict with system packages, even when using the
--user
option. The only way to use pip is either as pipx (which is not applicable for pynvim) or in a venv.Here is the error message I get:
Next I tried creating a venv and running
pip install pynvim
in it. This worked fine, but when I executed:UpdateRemotePlugins
I got the following error:The first problem is unfortunate because it means any Python-based plugin is now broken unless I am working on a Python project. Remote plugins have fallen somewhat out of favor since we have Lua, but they still have value if I really want to use a Python library. The second problem however breaks Python remote plugins entirely.