pip not working in Python Installation in Windows 10

pip not working in Python Installation in Windows 10

instead of typing in python. try using py.
for ex:

py -m pip install    packagename
py -m pip --install  packagename
py -m pip --upgrade  packagename
py -m pip upgrade    packagename

note: this should be done in the command prompt cmd and not in python idle. also FYI pip is installed with python 3.6 automatically.

Make sure the path to scripts folder for the python version is added to the path environment/system variable in order to use pip command directly without the whole path to pip.exe which is inside the scripts folder.

The scripts folder would be inside the python folder for the version that you are using, which by default would be inside c drive or in c:/program files or c:/program files (x86).

Then use commands as mentioned below. You may have to run cmd as administrator to perform these tasks. You can do it by right clicking on cmd icon and selecting run as administrator.

python -m pip install packagename
python -m pip uninstall packagename
python -m pip install --upgrade packagename

In case you have more than one version of python. You may replace python with py -versionnumber for example py -2 for python 2 or you may replace it with the path to the corresponding python.exe file. For example c:python27python.

pip not working in Python Installation in Windows 10

Its a really weird issue and I am posting this after wasting my 2 hours.

You installed Python and added it to PATH. Youve checked it too(like 64-bit etc). Everything should work but it is not.

what you didnt do is a terminal/cmd restart

restart your terminal and everything would work like a charm.

I Hope, it helped/might help others.

Leave a Reply

Your email address will not be published. Required fields are marked *