-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
numpy not importing in python3.7 virtualenv #14676
Comments
Please see #11110, where the solution was to |
This did not work for me.
|
What I did to make it work was create a virtual env with the I don't think this is the best way to do things, but it'll do for now. |
I also had this issue. For me running |
That worked for me ..... |
Worked |
Closing. Glad this solves the problem. |
Getting a EDIT: For anyone facing the same issue, try running the file without using the terminal. I used a button from the Python intellisense extension I have installed and it seemed to work. |
The long error message should help you debug the problem, which is probably caused by installing numpy with one interpreter and running with another. |
I did not get a long stack of errors. Only that and the line in my file where the trace started. I will add that having the venv selected is not enough, so it may be a vscode problem. |
Either someone is catching the import error and reformatting it so you don't see the error we carefully craft to handle this kind of situation, or the python you are running (try running |
I believe it was just one of those situations where the selected environment was not being used. And running that piece of code confirms it. I've managed to get around it by running the file with a button, which finds the file and runs it using the selected environment for me. Sorry for the trouble, and thank you! |
Reproducing code example:
Error message:
Numpy/Python version information:
Info that the error message requested:
The text was updated successfully, but these errors were encountered: