Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing pip in python 2.7?

Tags:

python-2.7

I am attempting to install a module (requests) in python 2.7.4 but am unable to do so because apparently I don't have pip installed? I tried to run "python pip --version" in CMD to check for it and got nothing in return except that pip is not a recognized command.

Have been googling the past 20 minutes and have tried each suggestion to no avail. Sorry for the stupid question but this is quite infuriating.

like image 640
Xert01998 Avatar asked Mar 13 '26 13:03

Xert01998


2 Answers

Python 2.7 must be having pip pre-installed.

Try installing your package by:

Open cmd as admin. (win+x then a)

Go to scripts folder: C:\Python27\Scripts

Type pip install "package name"

Note: Else reinstall python: https://www.python.org/downloads/

Also note: You must be in C:\Python27\Scripts in order to use pip command, Else add it to your path by typing: [Environment]::SetEnvironmentVariable("Path","$env:Path;C:\Python27\;C:\Python27\Scripts\", "User") For New versions

Older versions of python may not have pip installed and get-pip will throw errors. Please update your python (2.7.15 as of Aug 12, 2018).

All current versions have an option to install pip and add it to the path.

Steps:

Open Powershell as admin. (win+x thena')`

Type python -m pip install <package>.

If python is not in PATH, it'll throw an error saying unrecognized cmd. To fix, simply add it to the path as mentioned above.

like image 110
Bane Avatar answered Mar 16 '26 03:03

Bane


The new version of python is already contains pip. I feel that you yet not set the environment path. just set environment path and try again.

If the issue still exists you just install pip using typing the following command in CMD

python -m pip install.
like image 31
Codemaker Avatar answered Mar 16 '26 02:03

Codemaker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!