import sys import subprocess subprocess.run([sys.executable, '-m', 'pip', 'list']) ↓ asn1crypto (0.24.0) cryptography (2.1.4) Cython (0.29.16) decorator (4.4.2) idna (2.6) joblib (0.14.1) keyring (10.6.0) keyrings.alt (3.0) llvmlite (0.31.0) netifaces (0.10.4) networkx (2.4) numba (0.48.0) numpy (1.18.2) pip (9.0.1) pycrypto (2.6.1) Pygments (2.2.0) pygobject (3.26.1) python-apt (1.6.5+ubuntu0.2) pyxdg (0.25) PyYAML (3.12) scikit-learn (0.22.2.post1) scipy (1.4.1) SecretStorage (2.3.1) setuptools (46.1.3) six (1.11.0) unattended-upgrades (0.1) wheel (0.30.0)