pip not working in Python Installation in Windows 10

Scyber picture Scyber · Oct 3, 2016 · Viewed 117.4k times · Source

I downloaded and installed Python 3.5 from https://www.python.org/downloads/ on my Windows 10 machine with IDLE

I want to install other packages using pip using the following and various other options in the IDLE commandline editor.

>> pip install    packagename
>> pip --install  packagename
>> pip --upgrade  packagename
>> pip upgrade    packagename

Where packagename I have tried various packages available from my installed Python modules Tried all the above options without any packagename a well. In short, pip doesn't work and I am stuck.

I get Syntaxerror: invalid syntax

pip is preinstalled in my Python. confirmed this with the command "import pip" and from help('modules').

Need help on how to proceed.

System specs: Windows 10, with login as User (Local Admin privileges). this is the only User on my computer.

Answer

BJJ Vegan picture BJJ Vegan · Oct 15, 2017

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.