Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip not working on windows python 2.7.9

Tags:

pip

python-2.7

I've installed Python 2.7.9, which comes with already bundled with pip. I've check that it's there in the modules list. But when I run pip install I get SyntaxError: invalid syntax

With install highlighted as the error?

What am I doing wrong?

like image 371
Alex Kinman Avatar asked Feb 20 '15 04:02

Alex Kinman


2 Answers

Seems like you are running pip install from Python interactive console. Instead, you should run it from Windows console (cmd or PowerShell):

python2.exe -m pip install <package_name>

Where python2.exe is executable for Python2.7.9 (you may need to include full path to the executable file) and <package_name> is the name of package you want to install

like image 157
awesoon Avatar answered Oct 13 '22 14:10

awesoon


Append C:\Python27\Scripts;in PATH variable

where C:\Python27\Scripts; is the path where pip script is located.

like image 30
Ganesh Pandey Avatar answered Oct 13 '22 14:10

Ganesh Pandey