Skip to content

Instantly share code, notes, and snippets.

@vyach-vasiliev
Forked from stucka/pipreplace.sh
Created January 8, 2021 14:57
Show Gist options
  • Save vyach-vasiliev/b4a27917f1f00a3c1da7607bf3133c18 to your computer and use it in GitHub Desktop.
Save vyach-vasiliev/b4a27917f1f00a3c1da7607bf3133c18 to your computer and use it in GitHub Desktop.
Force pip to reinstall all Python packages (works great with https://gist.github.com/stucka/0ced1cc71e1a5c374a18874471636d69)
#!/bin/bash
pip freeze --local >pipfreeze.txt
pip install --upgrade --force-reinstall -r pipfreeze.txt
# second variant
#apt-get install libxml2-dev libssl-dev libffi-dev libxslt1-dev python-dev libjpeg-dev
#pip freeze --local >pipfreeze.txt
#tr '\n' ' ' < pipfreeze.txt >pipfreeze2.txt
#pip install --upgrade --force-reinstall `cat pipfreeze2.txt`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment