pythonwindowspiptweepysix

Unable to install tweepy in Python on Windows 7


I have Python 3.5.2 installed on Windows 7 (64bit). Pip module is installed as well by default. I am new to installing Python packages. I am trying to install tweepy module, but keep running into the problem described below:

1) I tried to install tweepy navigating to C:...\Python35\Scripts in command line and running "pip install tweepy" from there, but it returns the error below:

Command line error - pip installation

2) Afterwards, I downloaded tweepy from GitHub, unzipped it and try to install it from command line by navigating to the tweepy folder and running "setup.py install" from there, but I received the error below:

Command line error - setup.py installation

The installation crashed when trying to download some "six" module. Does anyone know solution to this problem? I read through all the possible posts, but none addresses this issue.


Solution

  • After some testing I was finally able to successfully import tweety in Python interpreter as well as all its dependencies (that includes modules six, requests, requests-oauthlib and oauthlib).

    The solution was the following:

    I installed six using pip install C:...\Python35\Scripts\file.whl. The wheel file was downloaded from https://pypi.python.org/pypi/six/. The same solution worked for requests module, which was also not installed and required as a dependency by tweepy 3.5.0.

    I installed requests-oauthlib using setup.py install from the folder where the unzipped tar.gz file was stored. I donwloaded the zipped tar.gz file from https://pypi.python.org/pypi/requests-oauthlib/0.7.0. The same solution worked for oauthlib module.

    To conclude, it seems like the original tweepy installation did not installed some of its dependencies along with it. The solution was to download all the missing modules from pypi (whl or tar.gz file) and install them one by one. The methods are more closely described above.