简体   繁体   中英

PIP not present in Python 3.8 for Windows

I read in the PyPa pip documentation that pip comes with Python versions above 3.4 . Meanwhile when I run the 'pip help' command on my command prompt it gives me the message below:

'pip' is not recognized as an internal or external command,
operable program or batch file.

I tried executing a suggested command from a response to a similar question yielding this:

Looking in links: c:\Users\Public\Documents\Wondershare\CreatorTemp\tmpdgjv05zc
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0

I ran 'pip' help again yet again it gave me the same tone-deaf message

'pip' is not recognized as an internal or external command,
    operable program or batch file.

I can run Python files and 'py --version' gives me the version of Python I'm using. I also tried placing the 'get-pip.py' file in a folder and getting to it through command prompt. Then I executed these commands

C:\Users\User\Desktop\pyt>python get-pip.py

C:\Users\User\Desktop\pyt>py get-pip.py

C:\Users\User\Desktop\pyt>python3 get-pip.py

They were executed immediately one-after-another but now no messages appear on the screen . Instead the OS goes to the next line, ignoring my command as if I didn't already execute one.

Why is it that I don't have pip installed? How can I install it?

Likely you didn't add your python installation to your path ( here's a how-to guide if you've never done this before ). If you are on windows then add %USERPROFILE%\\AppData\\Local\\Programs\\Python\\Python38\\Scripts\\ to your path. Change the 38 to whichever point release you installed (so if you installed python 3.7 then it would be 37 etc.).

Typically, when installing Python, if you add it to the PATH system environment variable, both the Python3x (containing the Python executable) and the Python3x\\Scripts (containing pip) folders will be added to your path.

Apparently, something has happened to your path causing only the first of those two to be on the path.

Check which Python is on the path by running where python from the command line. If that's the version of Python you expect to be using, add the Scripts folder for the same version to the path as well.

Alternatively, uninstall your version of Python and then reinstall, ensuring you check it so it adds Python to the PATH - at the end of the Windows installation, there's the option to lift PATH length restrictions, which may be your issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM