clearml/trains/backend_interface/task/repo/freeze.py

12 lines
273 B
Python
Raw Normal View History

2019-06-10 17:00:28 +00:00
import sys
from .util import get_command_output
def pip_freeze():
try:
return get_command_output([sys.executable, "-m", "pip", "freeze"]).splitlines()
except Exception as ex:
print('Failed calling "pip freeze": {}'.format(str(ex)))
return []