- create a clean
virtualenv
- install only the modules needed to run project
- run
pip freeze
to generate arequirements.txt
file- list of all installed packages and their versions
- install
pip-tools
pip install pip-tools
- create a
requirements.in
that lists all pip modules used by the project
# project dependencies
django
gunicorn
- use
pip-compile requirements.in
to generate arequirements.txt
file
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements.in
#
asgiref==3.2.10 # via django
django==3.1 # via -r requirements.in
gunicorn==20.0.4 # via -r requirements.in
pytz==2020.1 # via django
sqlparse==0.3.1 # via django