2

I've installed Numpy for python3, but when i import the package in Visual Studio Code i got this message error :
Import Error: No module named numpy.

I used pip3 install numpy to install it, the installation went very smoothly. and i try it in the terminal, it works very well but when i opend the file in Visual Studio Code and i executed it, i got the message error above.

Is there someone who has any idea about the problem?

1
  • Perhaps this isn't what you want but Visual Studio Code recognizes import numpy from sudo apt install python3-numpy and PyCharm Community edition recognizes import numpy from both pip install and apt install. PyCharm is more full-featured than Visual Studio Code.
    – karel
    May 19 '20 at 12:48
0

you have to check that the python version running from VScode is the same as the one running from the terminal (probably you running a different version of python in VScode and you didn't install numpy there) Check https://code.visualstudio.com/docs/python/environments For more Info

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.