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

Environment not activated before running linting? #18118

Closed
1 task done
highviolet opened this issue Dec 6, 2021 · 1 comment
Closed
1 task done

Environment not activated before running linting? #18118

highviolet opened this issue Dec 6, 2021 · 1 comment
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@highviolet
Copy link

VS Code version

1.62.3

Extension version

v2021.11.1422169775

OS type

Windows

OS version

Windows 10

Python distribution

Anaconda

Python version

3.9.7

Language server

Pylance

Expected behaviour

Conda environment activated before pylint is run

Actual behaviour

python.exe from the virtual environment is used, but the environment is not activated.

This causes pylint to throw "no-module-in-name" errors for the package lxml.

Steps to reproduce

Ctrl + Shift + P to run Linting.
Check output under Output/Python.

The need for activation can be tested using the same command in cmd.exe and checking behaviour when the environment is (or isn't) activated beforehand.

Logs

C:\src\apps\Anaconda3\envs\ENV\python.exe -m pylint --rcfile=.pylintrc --msg-template='{line},{column},{category},{symbol}:{msg} --reports=n --output-format=text

Code of Conduct

  • I agree to follow this project's Code of Conduct
@highviolet highviolet added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Dec 6, 2021
@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Dec 6, 2021
@karthiknadig
Copy link
Member

This should be addressed with support for conda run. Closing in favour of #17973

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants