Reputation: 30756
The only way I know how to freeze the requirements of a Python project is rather arduous:
pip freeze
How do you go directly from a requirements.txt
to a frozen requirements file, without all of the expensive side effects?
For example, if requirements.txt
looks like this:
abc
where abc
is a project that depends on another project called xyz
, and I run pip [something] > requirements_frozen.txt
, then requirements_frozen.txt
might look like:
abc==0.1
xyz==2.3
Upvotes: 5
Views: 1365
Reputation: 30756
The pip-tools library includes a command called pip-compile
which does this.
Upvotes: 1
Reputation: 45108
Use pipreqs
. It does just that - "and sometimes you just need to create requirements.txt for a new project without installing modules."
https://github.com/bndr/pipreqs
Upvotes: 0