8

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?

ChangeMyName
  • 5,012
  • 12
  • 46
  • 87

2 Answers2

8

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

Stop harming Monica
  • 10,533
  • 1
  • 27
  • 48
7

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

Community
  • 1
  • 1
JRazor
  • 2,301
  • 15
  • 26