A `pip` hack to upgrade all your Python packages
hackernoon.com
A `pip` hack to upgrade all your Python packages
1–5 of 5 posts
Re: A `pip` hack to upgrade all your Python packages
#2A similar script in Windows script (.bat)
for /F %%i in ( ' cat requirements\\base.txt ^| cut -f 1 -d ^= ' ) do pip install %%i --upgrade
Careful, it needs the unix utilities cat and cut on the path - they are included in various other packages so you will probably already have them.
Also, it must be run through a .bat file and not directly from the command line.
Re: A `pip` hack to upgrade all your Python packages
#3We use different files for "soft" requirements, dev/test requirements, and a freeze.txt containing all production requirements and then we default to installing from freeze.txt but can update from the other files. It's similar to this[1] but generating the freeze.txt in a temporary virtualenv.
I've started using an generated offline cache and PIP_FIND_LINKS to remove the dependency of pypi for known installs in one project as well, will be interesting to see if it turns out to be a good idea or not.
[1]: https://www.kennethreitz.org/essays/a-better-pip-workflow
Re: A `pip` hack to upgrade all your Python packages
#4Or, install pip-review.
Re: A `pip` hack to upgrade all your Python packages
#5Is it so difficult to upgrade all your outdated packages with pip?
All I do to upgrade with packages under virtualenv is the following:
pip install -U $(pip list -o --format=legacy | awk '{print $1}' | paste -sd ' ')
That's it, really.