3 ways to install Python Requests library

There are several ways to install requests package in Python. The easiest way is to use the pip install terminal command which will automatically install the latest version for the current desktop or just the user:

# system wide
$ pip install requests
# only for user
$ pip install --user requests

Alternatively, we can use a package manager such as poetry:

# create new poetry project with `requests` dependency
$ poetry init --dependency=requests

or pipenv package manager:

$ cd myproject
$ pipenv install requests
Question tagged: requests