Installed Python, but cannot run `pip`

0

I installed Python 3.7.3 on Windows 10. From the command line, if I enter pip I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'pip' is not defined

It looks like something is missing (pip should be included by default).

The file I installed Python from is: python-3.7.3-amd64.exe (25 MB)

I tried to modify the installation, adding pip as an optional feature, without any improvement.

I tried to repair the previous installation, successfully, again without any improvement.

How can I fix this issue?


From the Windows command prompt, however, pip works:

python -m pip install scipy

Is pip intended to be used out of Python only?

Pietro

Posted 2019-05-03T10:23:31.277

Reputation: 1 205

Answers

4

The problem is that you are entering pip in the wrong command line.

You are entering it in the Python CLI whereas it has to be used in the regular Windows command line.

Is pip intended to be used out of Python only?

Yes, it is.


In cmd you can use pip -V to see if it is really installed properly. You can then proceed by using the following command to check what you can do:

pip help

Fanatique

Posted 2019-05-03T10:23:31.277

Reputation: 3 475