Packages are an important way to extend the functionality of Python. We've worked with packages like matplotlib
and pandas
. The best way to install packages is to use the command line, and a program called pip. The newest versions of Python include pip by default, so installing Python will automatically give you access to pip.
In order to install a package with pip, we just usepip install
. pip install requests
will install the requests package, which can be used to interact with websites and APIs.
Instructions
Type pip install requests
to install the requests package.
- Since the library is already installed, you'll receive an appropriate message to reflect that.
/home/dq$ pip install requests
Requirement already satisfied (use --upgrade to upgrade): requests in /dataquest
/system/env/python3/lib/python3.4/site-packages