'Is there an alternative to pip freeze in order to keep packages up to date?
So I am setting up a Github repository with Gitpod through my Ipad. I learned I could use this command in order to easily load every requirement with the .gitpod.yml file.
pip freeze > requirements.txt
My question is: inside the requirements file, the packages are listed with their current version, but I would love them all to be of the form:
pandas==*
and not:
pandas==1.4.1
Thanks in advance for any help!
Solution 1:[1]
You can do:
pip freeze | sed 's|==.*|==*|g' > requirements.txt
Solution 2:[2]
inside the requirements file, the packages are listed with their current version
...keep packages up to date?
Then put the entry as just pandas without any version number:
pandas
It will upgrade to the latest version whenever you do pip install --upgrade -r requirements.txt.
Note that you shouldn't do this in a production environment because it's possible for a future version to become incompatible with your current code or other libraries.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AXON |
| Solution 2 | aneroid |
