Unable to install any modules with Pip and this error

36 views Asked by At

enter image description here

I have installed python on my windows laptop appropriately but am unable to use or execute many things due to this kind of error. How do I come out of the shell and execute

I want to install modules and libraries on python and want to get rid of this error.

2

There are 2 answers

1
VoNWooDSoN On

pip is not a command for the interpreter, it is a module. To invoke pip you should enter python3 -m pip install numpy on your command line.

0
Suramuthu R On

You have gone inside the python interpreter by commanding python3. You should install from the command line. Just open the command line and type. Only if you want to do interactive task in python then you should go to python interpreter,

Your python version is python-3. So you should install modules with pip as following:

pip3 install numpy

In some OS(as I saw in some linux distros), some of the modules don't work with the above. In that case, you can use the following:

python3 -m pip install --upgrade numpy