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

Mason: How do I specify python environment to use in pylyzer? #55

Open
Quakumei opened this issue Sep 18, 2023 · 3 comments
Open

Mason: How do I specify python environment to use in pylyzer? #55

Quakumei opened this issue Sep 18, 2023 · 3 comments

Comments

@Quakumei
Copy link

Quakumei commented Sep 18, 2023

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:

streamlit module is installed, however pylyzer can't see it

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.

@TudorAndrei
Copy link

#22

It's currently not supported.

@failable
Copy link

Ideally it should read VIRTUAL_ENV automatically.

@erasin
Copy link

erasin commented May 6, 2024

pyright read pyproject.toml https://microsoft.github.io/pyright/#/configuration?id=pyright-configuration

[tool.pyright]
venvPath = "."
venv = ".venv"

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

4 participants