-
Notifications
You must be signed in to change notification settings - Fork 768
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
Pylance not finding venv modules what venv is active #4679
Comments
You can check from the terminal if that python3 interpreter version is the same python version selected in VSCode. If you open terminal and type 'python3' you'll see your python version (python3 version is 3.11.3), then open your IDE and navigate until any current folder that related to python project, check the python version at the bottom right on VSCode for example (in my case the python version is also 3.11.3).
Originally, I tried to install numpy by the following command. sudo apt-get install python3-numpy Numpy was installed successfully as stated in the terminal and the problem is still there, but when I try to install numpy by the following command, the problem solved. pip install numpy I hope this can help. |
This message means that you don't have numpy installed in the Python environment that is currently selected. From reading your logs, the interpreter you have selected appears to be 3.10, which is different from the python version described in the issue. Could you check if that's the interpreter you've installed numpy into? If you look at the bottom right corner of the window, you should see which environment is selected. You can also refer to this guide on selecting your environment. https://code.visualstudio.com/docs/python/environments#_select-and-activate-an-environment |
You have |
I was working in |
I hit same issue. |
I've changed pre-release version because I expected to fix this issue. I look fixing to me. |
Hi there, can you verify if the problem still persists using the latest pylance? The |
Environment data
Code Snippet
Repro Steps
Expected behavior
Pylance should see that the venv is active and find the module
Actual behavior
Pylance reports reportMissingModuleSource
Logs
python-language-server-log.txt
The text was updated successfully, but these errors were encountered: