Closed 5huanghuai closed 2 months ago
I am using lazy.nvim
{
'kiddos/gemini.nvim',
build = { 'pip install -r requirements.txt', ':UpdateRemotePlugins' },
config = function()
require('gemini').setup()
end
}
You will have to install python dependencies manually if you decide not to add pip install -r requirements.txt
in build command
Arch Linux does not allow to install system-wide Python packages via pip, so the command will fail at install.
However I created a package for google-generativeai which I just pushed to AUR, installing this should work.
Reference to the package mentioned above: https://aur.archlinux.org/packages/python-google-generativeai
when i use :UpdateRemotePlugin ,i get this error. it seems like doesn't run 'pip install -r requirements.txt'
Encountered ModuleNotFoundError loading plugin at /home/xx/.local/share/nvim/lazy/gemini.nvim/rplugin/python3/gemini: No module named 'google' Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/pynvim/plugin/host.py", line 187, in _load module = _handle_import(directory, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pynvim/plugin/host.py", line 40, in _handle_import return importlib.import_module(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
ModuleNotFoundError: No module named 'google'
remote/host: python3 host registered plugins []
remote/host: generated rplugin manifest: /home/xx/.local/share/nvim/rplugin.vim
I install python through this .
sudo pacman -S python python-neovim python-pip python-google-api-python-client os: Arch python:3.11.8 pip: 24.0 python-neovim : 0.5.0