user8393084
user8393084

Reputation: 103

Unable to import tweepy (Python 3.7 - tweepy 3.5)

I'm facing a problem trying to import tweepy library in my code, I've tried to uninstall it and then install it again but I still get the same problem.

This is my code (error) and command line: enter image description here

Thank you.

Upvotes: 3

Views: 3005

Answers (5)

Igor Siriani
Igor Siriani

Reputation: 21

Try to install this version instead

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

This command will install the GitHub's latest version

Upvotes: 1

cristiandatum
cristiandatum

Reputation: 357

Tweepy will not work on Python 3.7 (see reasons in below github post), instead if you are using Anaconda, create an alternative environment in Python 3.6.7 and it will work. :-)

I've been experiencing similar idiosyncrasies with wptools and other packages.

https://github.com/tweepy/tweepy/issues/1017

Upvotes: 0

user8393084
user8393084

Reputation: 103

Thank you everyone, I just downloaded Python 3.6 and solved the problem :)

Upvotes: 1

Vikash Singh
Vikash Singh

Reputation: 14001

Tweepy doesn't work with python 3.7 yet.

Similar question: Having trouble installing Tweepy

Official documentation says : https://github.com/tweepy/tweepy

Python 2.6 and 2.7, 3.3, 3.4, 3.5 & 3.6 are supported.

As suggested by Samuel. Create a virtual environment I would suggest go with 3.6.

And then pip install tweepy in that environment.

Upvotes: 2

Samuel Omole
Samuel Omole

Reputation: 185

Try using a virtual environment, I had the same issue when i was still using windows.

Upvotes: 1

Related Questions