0

I want to use NumPy library on visual studio code (working with jupyter), but there appears an error when I try to install that from editor's terminal by pip3 install numpy. The error is shown in the following image:

enter image description here

How could I install NumPy correctly?

Ali_Sh
  • 2,667
  • 3
  • 43
  • 66
28Greka
  • 11
  • 2
  • 5

3 Answers3

1

you need to locate your python file... i had to use the address to access the pip command here's an example that works on my VS Code terminal(using python 3.7 version but pretty sure its all the same just the way we execute it on VS Code

"C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python37_64/python.exe" -m pip intall numpy

or

python -m pip intstall numpy

this code works on my VS Code in terminal... hope this is helpful.. just remember every dir is different. so locate your python

Zirel23
  • 11
  • 4
  • "C:\Users\G R E C I A\AppData\Local\Microsoft\WindowsApps\python.exe" in my case, where is the python.exe this is my dir... so i put this + -m pip install numpy but it say that doen't exists... and i tried to put it with : cd but it doesn't work either... do you know if is necesary to install anaconda or something else besides visual studio code and python? – 28Greka Nov 01 '20 at 05:11
0

It looks like your Visual Studio Code knows that it's using python 3. Try using the command pip instead of pip3.

cadolphs
  • 9,014
  • 1
  • 24
  • 41
0

To install numpy with python 3.9 as kernel inside VSCode enter image description here

These are the steps (in Italian) : enter image description here

enter image description here

enter image description here

enter image description here

The last command is : python3.9 -m pip install numpy