pylyzer
pylyzer copied to clipboard
Mason: How do I specify python environment to use in pylyzer?
The issue
#54 might have mentioned that, however they have a different issue. My question is more general.
I have two python environments - virtual env and system environment, which seems to be enforced by default. Why enforced?
When entering nvim, having executed source ./venv/bin/activate
, pylyzer can't find installed modules. Example below:
Specs
NVIM: v0.9.2 pylyzer: v0.0.45 python env:
:!pip --version
pip 23.0.1 from /home/quakuei/Desktop/iamjaf/spbstu/postgre-tasks-spbstu/car_service/car_service_fr
ontend/venv/lib/python3.8/site-packages/pip (python 3.8)
:!which python
/home/quakuei/Desktop/iamjaf/spbstu/postgre-tasks-spbstu/car_service/car_service_frontend/venv/bin/
python
What I've searched
Couldn't find information on that matter in documentation, unfortunately.
This is what I looked through
Saw pyright stackoverflow discussion on similar topic, however solution seems to be related to pyright, and also they used an older version of nvim
Saw venv-selector.nvim on github, however no out-of-box support for pylyzer mentioned.
What can I do to specify the python environment to use for pylyzer? Thanks.
#22
It's currently not supported.
Ideally it should read VIRTUAL_ENV
automatically.
pyright read pyproject.toml https://microsoft.github.io/pyright/#/configuration?id=pyright-configuration
[tool.pyright]
venvPath = "."
venv = ".venv"