How to retrieve pip requirements (freeze) within Python? -
i posted question on git issue tracker: https://github.com/pypa/pip/issues/2969
can have manner of calling pip freeze/list within python, i.e. not shell context?
i want able import pip , requirements = pip.freeze(). calling pip.main(['freeze']) writes stdout, doesn't return str values.
there's pip.operation.freeze in newer releases (>1.x):
from pip.operations import freeze x = freeze.freeze() p in x: print p
output expected:
amqp==1.4.6
anyjson==0.3.3
billiard==3.3.0.20
defusedxml==0.4.1
django==1.8.1
django-picklefield==0.3.1
docutils==0.12
... etc
Comments
Post a Comment