13.6 Tweepy

We’ll use the Tweepy library6 (http://www.tweepy.org/)—one of the most popular Python libraries for interacting with the Twitter APIs. Tweepy makes it easy to access Twitter’s capabilities and hides from you the details of processing the JSON objects returned by the Twitter APIs. You can view Tweepy’s documentation7 at

http://docs.tweepy.org/en/latest/

For additional information and the Tweepy source code, visit

https://github.com/tweepy/tweepy

Installing Tweepy

To install Tweepy, open your Anaconda Prompt (Windows), Terminal (macOS/Linux) or shell (Linux), then execute the following command:

pip install tweepy==3.7

Windows users might need to run the Anaconda Prompt as an Administrator for proper software installation privileges. To do so, right-click Anaconda Prompt in the start menu and select More > Run as administrator.

Installing geopy

As you work with Tweepy, you’ll also use functions from our tweetutilities.py file (provided with this chapter’s example code). One of the utility functions in that file depends on the geopy library (https://github.com/geopy/geopy), which we’ll discuss in Section 13.15. To install geopy, execute:

conda install -c conda-forge geopy
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.113