Tweepy 3.10.0, AttributeError: module 'tweepy' has no attribute 'Client'

Viewed 7405

I am trying to use version 2 of the Twitter API with tweepy 3.10.0, and I got confused when following the documentation, https://docs.tweepy.org/en/latest/client.html

When I tried to set the API, like in the following example:

import tweepy

client = tweepy.Client(consumer_key=consumer_key, 
                                consumer_secret=consumer_secret,
                                access_token=access_token, 
                                access_token_secret=access_token_secret)

   

I got this error: AttributeError: module 'tweepy' has no attribute 'Client'

I have used Tweepy before and it worked for some tests I configured, but I need to use version 2 since I want to execute some functionalities of this version of the API.

What is my error?

1 Answers

Tweepy.Client and its support for Twitter API v2 is still in development on the master branch.
It is not yet released and is not part of v3.10.0, but it is set to be released as part of v4.0.

https://docs.tweepy.org/en/latest/ is the latest development version of the documentation.
For documentation for v3.10.0, see https://docs.tweepy.org/en/v3.10.0/.

Related