Difficulty running pip from command prompt

4

I'm trying to install numpy on my computer following the instructions here.

I've got the command prompt working to find python after adding it to my path and I installed it from python.org which should have apparently configured pip for usage with installation, but when I try to enter pip --version in my command prompt it says that pip is not recognized as an internal or external command, operable program or batch file. Entering python -m ensurepip --default-pip yields

Looking in links: C:\Users\alecj\AppData\Local\Temp\tmpu_bljns8
Requirement already satisfied: setuptools in c:\users\alecj\appdata\local\programs\python\python37-32\lib\site-packages (39.0.1)
Requirement already satisfied: pip in c:\users\alecj\appdata\local\programs\python\python37-32\lib\site-packages (10.0.1)

which looks like it's there, but I can't check the version or do anything else with it from the command prompt. How can I get my command prompt to find pip? I tried adding the above location for pip to my path but it didn't appear to help.

Alec Rhea

Posted 2018-07-06T04:05:54.057

Reputation: 157

Answers

3

These are my results under a clean install of Windows 10 Home:

When I download python 3.7 from https://www.python.org/downloads/, I can install python from an executable called python-3.7.0.exe found in my Downloads folder. Make sure to check the box "Add Python 3.7 to PATH".

Now, opening the Command Prompt, I can see the following:

Microsoft Windows [Version 10.0.16299.15]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\nelsn>pip --version
pip 10.0.1 from c:\users\nelsn\appdata\local\programs\python\python37- 
32\lib\site-packages\pip (python 3.7)

C:\Users\nelsn>python -m ensurepip --default-pip
Looking in links: C:\Users\nelsn\AppData\Local\Temp\tmp2wrxm7p6
Requirement already satisfied: setuptools in c:\users\nelsn\appdata\local\programs\python\python37-32\lib\site-packages (39.0.1)
Requirement already satisfied: pip in c:\users\nelsn\appdata\local\programs\python\python37-32\lib\site-packages (10.0.1)

Next, running pip install requests definitely works for me. I can type python in the Command Prompt to enter a python repl, and import requests just fine. (Oh, and also pip install numpy just fine as well.

Nels

Posted 2018-07-06T04:05:54.057

Reputation: 71

Thank you -- I see python-3.7.0.exe in my downloads, but my command prompt still doesn't find pip; here's a picture http://tinypic.com/r/2ykgx3n/9. Should I just try to reinstall, or is there a picture of some other folders I should show you?

– Alec Rhea – 2018-07-06T05:58:59.950

I recommend that you attempt to reinstall, unless you are absolutely certain that you had checked the box "Add Python 3.7 to PATH", the first time that you tried to perform the installation. – Nels – 2018-07-06T06:08:04.000

1The reinstall worked perfectly, I must not have checked the box. Much appreciated! – Alec Rhea – 2018-07-06T06:09:21.747

It appears that pip successfully installed numpy when I asked it to, but I'm now unable to import numpy to my python scripts -- any simple suggestions, or should I post a separate question? Here is a pic for reference http://tinypic.com/r/5vsj7c/9.

– Alec Rhea – 2018-07-06T07:08:01.763