9

I followed these instructions for installing pip on Windows 7. When I try to install the example package with pip install httpie (or any other package), it gives me the following error:

SyntaxError: invalid syntax

It also highlights the word install. And that's it. I am using Python 3.3.1 and used the corresponding installers in the instructions at the link above. Finally, I apologize if you consider this a duplicate, but Stack Overflow will not allow me to post on the answer in the original thread and I am getting an error message that they do not discuss.

Community
  • 1
  • 1
Michael
  • 10,378
  • 18
  • 56
  • 101
  • Same issue was experienced however the command executed in shell, and resolved by erasing python-pip (yum erase python-pip) and again installing (yum install python-pip). It might be helpful in some cases. – Suresh Gautam May 03 '18 at 01:15

2 Answers2

23

You should type that in the command prompt, not in Python.

Daniel Roseman
  • 541,889
  • 55
  • 754
  • 786
9

You're typing those commands in Python. They are not Python commands, they are shell commands. Type them in your shell!

kindall
  • 158,047
  • 31
  • 244
  • 289