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
This knowledgebase is provided by Scrapfly — a web scraping API that allows you to scrape any website without getting blocked and implements a dozens of other web scraping conveniences. Check us out 👇