Skip to content

Instantly share code, notes, and snippets.

@boazcstrike
Created February 10, 2021 06:14
Show Gist options
  • Save boazcstrike/93903077c1c489367d17f53985c83b85 to your computer and use it in GitHub Desktop.
Save boazcstrike/93903077c1c489367d17f53985c83b85 to your computer and use it in GitHub Desktop.

Upgrading dependencies

There is 2 methods of upgrading the python dependencies. WARNING: there is a 70% chance that this will generate warnings and errors due to dependency mismatches; this will break most codes; this command should be ran only once a week - once a month or, to be safe, none at all

Using pip-review

pip3 install pip-review # on mac
pip install pip-review # on win

# upgrade
pip-review --interactive

Using the vanilla upgrade

pip3 install -r requirements.txt --upgrade # on mac
pip install -r requirements.txt --upgrade # on win

# don't forget to save the upgraded dependecies version
pip3 freeze > requirements.txt # on mac
pip freeze > requirements.txt # on win

# docker mode
docker-compose -f local.yml run --rm pip freeze > requirements.txt --upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment