-1

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.

Yanic
  • 101
  • 5

2 Answers2

0

Your first screenshot is clear.

The sentence Requirement already satisfied makes me thinks that you have already installed tweepy.

To check this I suggest you to go in C:...\Python35\Scripts and type

pip freeze

This command shows all packages that you have installed. So check if there is tweepy.

After this try to open a terminal and launch python3 interpreter. Try to import in this way:

import tweepy

If this command doesn't raise any error, your package is ready to be used.

If you are not able to use it yet, try to update tweety as MooingRawr suggests you in the comments.

Lastly, i suggest you to read the documentation, for each package not only for tweepy.

Giordano
  • 5,422
  • 3
  • 33
  • 49
  • 1) `pip freeze` returns "tweepy==3.6.0" os that means tweepy is already installed. 2) `import tweepy` in Python interpreter gives me the following response: Traceback (most recent call last): File "", line 1, in import tweepy File "C:\Users\JHavlas\AppData\Local\Programs\Python\Python35\lib\site-packages\tweepy-3.6.0-py3.5.egg\tweepy\__init__.py", line 12, in from tweepy.models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResults, ModelFactory, Category @roganjosh @MooingRawr – Yanic Oct 07 '16 at 08:14
  • File "C:\Users\JHavlas\AppData\Local\Programs\Python\Python35\lib\site-packages\tweepy-3.6.0-py3.5.egg\tweepy\models.py", line 7, in from tweepy.utils import parse_datetime, parse_html_value, parse_a_href File "C:\Users\JHavlas\AppData\Local\Programs\Python\Python35\lib\site-packages\tweepy-3.6.0-py3.5.egg\tweepy\utils.py", line 9, in import six ImportError: No module named 'six' How can I fix module six? 3) `pip install tweepy --upgrade` gives me the same response as when trying to install with pip - ''Requirement satisfied'' @roganjosh @MooingRawr – Yanic Oct 07 '16 at 08:19
  • try to install it in this way: 'easy_install six' – Giordano Oct 07 '16 at 08:22
  • 'easy_install six' gives me this result [link](http://www.filetolink.com/6478aadeb2). Is it possible to download that module "six" myself and install it manually? – Yanic Oct 07 '16 at 08:50
  • I made a little progress as I succesfully installed "six 1.10.0" and "requests 2.11.1" modules as those both gave me the "No module named MODULE_NAME" error when passing "import tweepy" to Python interpreter. I downloaded file.whl from pypi and installed it by 'pip install C:...\Python35\Scripts\file.whl' in command line. It worked. However when I tried to import tweepy I received this error "ImportError: No module named 'requests_oauthlib' " This module cannot be installed using the above described method. It gives me: "Could not find a version that satisfies the requeirement" – Yanic Oct 07 '16 at 10:57
0

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.

Yanic
  • 101
  • 5