4

Can't get pip to work; trying to install Tweepy per this article.

This thread managed to solve it for someone installing a different package, but I've tried all the strategies listed there including changing PATH in my environment variables, and I get "syntax error" for each of these three attempts:

pip install tweepy

python -m pip install tweepy

C:\Python27\Scripts\pip.exe install tweepy
Community
  • 1
  • 1
coopchange
  • 41
  • 1
  • 1
  • 2

6 Answers6

8

Are you using pip install command inside of the python prompt? If yes then you need to type it directly into command prompt.Open command prompt and type.

pip install tweepy
ryux
  • 181
  • 3
  • 3
2

Just try adding sudo before the command, should look like this sudo pip install tweepy

0

C:\>pip install tweepy

The first command is enough provided that pip has been added to the Path environment variable of your system. To check it out, do this:

  1. Open Command Prompt (DOS prompt).
  2. Type python and press enter.
  3. Once python prompt (>>>) appears, type import pip and press enter.

If you see an error, then pip has not been added to the environment variable Path. If there's no error whatsoever, then pip is installed properly.

In that case, re-install Python once and try again. I am using Python 3.5 and tweepy works fine for me. I see that you are using Python 2.7 version. I hope Python has been properly installed. If you want, try uninstalling Python and then re-installing it properly just to make sure. I will also suggest you to try using Python 3.x version once to see if you get the same error.

Hope it helps.

CodeZeus
  • 61
  • 1
  • 6
0

For python3 use pip3 install tweepy command from your terminal

Mir Rahed Uddin
  • 1,208
  • 2
  • 12
  • 25
0

1.You can use Git to clone the repository from GitHub to install the latest development version:

git clone https://github.com/tweepy/tweepy.git  
cd tweepy  
pip install.

2.Else install directly from GitHub repository:

pip install git+https://github.com/tweepy/tweepy.git

reference: http://docs.tweepy.org/en/latest/install.html

Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
chantya127
  • 66
  • 3
0
py -m pip install tweepy

worked for me!