I am new to Django.
Every time I install new library using pip
, I have to run pip freeze -l > requirements.txt
and sometimes I forget this ( and error happens at my production environment).
What's the best way to run this command automatically when I install new packages...?
I am using:
Django==1.11.5
Python 3.6.1
When using just plain pip to install packages, there is currently no way to make it automatically generate or update a requirements. txt file. It is still a manual process using pip freeze > requirements.
Use the pip install -r requirements. txt command to install all of the Python modules and packages listed in your requirements. txt file.
It will upgrade all the packages that are not at their latest versions, and also create an updated requirements. txt at the end.
For Python 3 use below to update requirements.txt file. ''' pip3 freeze > requirements.txt '''
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With