Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use pip in Windows? [duplicate]

I am trying to install some modules using pip. My system is Windows 7 64-bit, and I'm using Python Shell and Python 2.7.

I've typed in following code to start the installation:

python -m pip install traitlets

According to this page, the above code should work. However I've got pip highlighted in red and an error message:

SyntaxError: invalid syntax

Can someone please point out what is wrong with my code?

like image 294
ChangeMyName Avatar asked Mar 04 '16 10:03

ChangeMyName


Video Answer


2 Answers

You have to execute that command in a windows command prompt, not in a python shell.

like image 176
Stop harming Monica Avatar answered Sep 28 '22 10:09

Stop harming Monica


How do I install pip on Windows?

This installed Pip at C:\Python27\Scripts\pip.exe. Find pip.exe on your computer, then add its folder (for example, C:\Python27\Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:

pip install httpie

like image 42
JRazor Avatar answered Sep 28 '22 11:09

JRazor