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
  • 13,244
  • 23
  • 67
  • 115
  • 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

24

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

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895
9

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

kindall
  • 178,883
  • 35
  • 278
  • 309