Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use semshi in venv? #109

Open
sumarokov-vp opened this issue Aug 28, 2021 · 2 comments
Open

How to use semshi in venv? #109

sumarokov-vp opened this issue Aug 28, 2021 · 2 comments

Comments

@sumarokov-vp
Copy link

When I try to open python file with enabled venv (source venv/bin/activate), I have some errors:

function 10_filetype_changed[4]..remote#define#CommandBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[14]..provider#Poll:

Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.

E171: Отсутствует команда :endif
Обнаружена ошибка при обработке function 10_filetype_changed:
строка 4:
E171: Отсутствует команда :endif

@wookayin
Copy link
Contributor

wookayin commented Nov 3, 2021

You should set g:python3_host_prog properly (in your init.vim). This is an example how you can assign it dynamically:

let g:python3_host_prog = substitute(system("which python3"), '\n\+$', '', '')

This will set a path to the python3 exectuable that can be found in your $PATH.

@blueyed
Copy link
Contributor

blueyed commented Nov 6, 2021

(Note however that activating a virtualenv typically adds it to $PATH, and it sounds like it is not wanted to use the venv, to not have to install pynvim there then also.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants