Lo-Fi Python

Jan 23, 2022

How to Upgrade Requests in the Bash Console

This command can be used to upgrade your Python requests library with pip, Python's package manager. It is tailored for a PythonAnywhere environment. I suppose this command works on any Bash console, but if you're running your app with pythonanywhere, you can find the bash console here:

::
https://www.pythonanywhere.com/user/your_username/consoles/
bash console python install

Install requests with this command:

python3.8 -m pip install requests --upgrade --user

Substitute in whatever your Python version is. This command upgrades the requests library on a PythonAnywhere app. If any libraries depend on a specific version of requests, a warning appears like this one I saw for the python-unsplash library.

ERROR: python-unsplash 1.1.0 has requirement requests==2.20.0, but you'll have requests 2.27.1 which is incompatible.
Requests upgrade python library