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?

Novice BL
  • 21
  • 1
  • 1
  • 3
  • Perhaps this isn't what you want but Visual Studio Code recognizes `import numpy` from `sudo apt install python3-numpy` and [PyCharm](https://askubuntu.com/a/1215717/94914) 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

1 Answers1

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

MaZ
  • 1
  • 2