Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] Vim youcompleteme and ycmd not working in Python virtual environments

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
vazaha
Posts: 1
Joined: 2024-03-26 19:22

[Software] Vim youcompleteme and ycmd not working in Python virtual environments

#1 Post by vazaha »

I'd like to use the youcompleteme plugin for vim code autocompletion, using the package contained in the vim-youcompleteme package in the Debian 12 main repo. In particular, I want to use it on Python scripts running in virtual environments.

I installed the package via

Code: Select all

aptitude install vim-youcompleteme
(which replaced my vim.basic with vim.nox via update-alternatives), and activated it in my vimrc adding:

Code: Select all

packadd youcompleteme
Everything works very fine, besides the case in which I have a Python environment activated: in this case, as soon as vim starts I obtain an error like this:

Code: Select all

2024-03-26 21:54:30,895 - ERROR - The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). Unexpected exit code 1. Type ':YcmToggleLogs ycmd_55813_stderr_y3bl9e36.log' to check the logs.
The stderr log mentioned in the message is empty (I also tried to set

Code: Select all

let g:ycm_server_log_level = 'debug'
in my vimrc but nothing changed).
I checked the youcompleteme documentation and found that the virtual environment case is explicitly treated, so I tried to apply the instructions provided here, but nothing changed. I also tried to play around with the ycm_python_interpreter_path variable testing different python3 binaries, notably I tried to set

Code: Select all

let g:ycm_python_interpreter_path = '<my_python_venv_path>/bin/python3'
(just for testing purpose since it would be an horrible solution) but no improvements here too.

Do you have any idea or any suggestion?

Thanks in advance!

Post Reply