0

enter image description hereenter image description here

I'm trying to install wikipedia's basic python package with pip, and I keep getting syntax errors. I'm using pip through the python command line. Attached a screen shot of what I'm trying to do here. Any ideas as to what I'm doing wrong?

MattDMo
  • 90,104
  • 20
  • 213
  • 210
JonGor
  • 67
  • 1
  • 9
  • You do not need the `$` character, that is just the prompt charcter for linux, like `>>>` for IDLE. And `sudo` is a linux command, not windows. – Cory Kramer Feb 13 '15 at 17:38
  • 1
    Why are you trying to run `pip` in the Python interpreter?! – jonrsharpe Feb 13 '15 at 17:39
  • I tried sudo and the $ sign after regular did not work – JonGor Feb 13 '15 at 17:40
  • @JonGor Read my comment above, neither of those apply to windows. – Cory Kramer Feb 13 '15 at 17:42
  • It appears that `pip` is **not** correctly installed for the command line. How precisely did you install it? Please stop posting screenshots, it's much better to provide code-formatted text. – jonrsharpe Feb 13 '15 at 17:50
  • OK, sure. I copied the text from https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py to my python interpreter ( Pycharm) and ran it. I got a "successfully installed" notification. – JonGor Feb 13 '15 at 17:54
  • The Python interpreter and the command line are two very different things. –  Feb 13 '15 at 17:58
  • Perhaps take a look at http://stackoverflow.com/q/4750806/3001761 – jonrsharpe Feb 13 '15 at 18:02

3 Answers3

2

pip must be run from the command shell, not the python shell.

horns
  • 1,734
  • 1
  • 17
  • 24
2

run it from a cmd prompt not a python interpreter:

 pip install wikipedia

If you don't have pip installed which you don't seem to have then download get-pip.py and run python get-pip.py

Padraic Cunningham
  • 160,756
  • 20
  • 201
  • 286
-2

You could also download the python install package, extract it, navigate to install.py in CMD and do "python install.py install"

Yeniaul
  • 1
  • 4