M BUZZ CRAZE NEWS
// news

no module named numpy error in python 3

By Daniel Rodriguez

i am using visual studio code for python3, and i installed pip and numpy on it. also changed path in command prompt. but it is still showing this error "ModuleNotFoundEror: no module named numpy"

1

1 Answer

Check to see if the python environment is matching (i.e. run "which python" in VSCode's terminal or see options in the interpreter dropdown). It might very well be the case that VSCode is pointing to a different instance of the interpreter, which doesn't have numpy installed.

VSCode-specific solution: o select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).

Extra mention for other people stumbling across this question: This is quite a generic issue if you have a mixture of barebones python, anaconda/miniconda plus almost any IDE (what you describe happens on Pycharm as well). The solution always boils down to making the IDE point to the correct interpreter/environment.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy