<#17721 Support `./pants freeze --resolve=xyz`> Ne...
# github-notifications
q
#17721 Support `./pants freeze --resolve=xyz` New issue created by da-tubi Is your feature request related to a problem? Please describe. import a lockfile into an existing virtualenv Describe the solution you'd like
Copy code
./pants freeze --resolve=xyz.                      # like pip freeze
./pants freeze --resolve=xyz --secured     # like pex3 lock export
or
Copy code
./pants import --resolve=xyz # in that way, we do not need to pip install
Describe alternatives you've considered Workaround 1 https://github.com/da-tubi/pants-minimal-freeze Workaround 2 The following command line is similar to
pip freeze
Copy code
pex3 lock export 3rdparty/python/xxx.lock
Then we can use the exported
requirements.txt
in the specific virtual env:
Copy code
pex3 lock export 3rdparty/python/xxx.lock > /tmp/requirements.txt
# pyenv activate xxx or conda activate xxx
pip install -r /tmp/requirements.txt
And
pex3 lock export
does not work for pants' lockfile, because there are
//
leading parts. For now, we can use command line to strip the leading
//
. Additional context None pantsbuild/pants