0

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!

2 Answers2

2

You can do:

pip freeze | sed 's|==.*|==*|g' > requirements.txt
AXON
  • 183
  • 1
  • 5
0

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.

aneroid
  • 12,983
  • 3
  • 36
  • 66
  • Thank you for the answer!.. And is there a way to create the requirements file without the version of each dependency? I am using `pip freeze > requirements.txt` but it adds the version automatically. – Santiago Ruiz Zuluaga Mar 23 '22 at 13:30