Freezing Installed Python Packages

less than 1 minute read

Published:

Freezing Installed Python Packages

Use the pip freeze command to generate a list of installed packages and their versions and save it to the requirements.txt file.

pip freeze > requirements.txt

The requirements.txt file can be used to install the same packages and versions on another machine.

pip install -r requirements.txt