coc-python
coc-python copied to clipboard
coc-python can not pick interpreter in venv
I am running python inside a venv, I want to make sure the python points to the venv one, after that coc is trying to install pylint via "my/venv/python -m pip install -U pylint --user" but the flag '--user' is not supported in venv, somehow coc-python still has it.
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
I have the same problem
I'm using a project with pipenv
and it seems to work great there.
@laoshaw , @ACLeiChen and @insidewhy this happens in a virtualenv when this is configured:
include-system-site-packages = false
@chemzqm , the code that add --user
to pip install
is here:
https://github.com/neoclide/coc-python/blob/master/src/common/installer/moduleInstaller.ts#L40
Is there a way to check when this error happens:
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
and to try whitout --user
then?
I am not very savvy when it comes to typescript. I at least tried to remove the --user
and confirmed that this fixed this issue.
Thanks in advance, Antoine
Workaround from the upstream issue: https://github.com/microsoft/vscode-python/issues/14327#issuecomment-727288323