0

I know that pip install or pip freeze can give out the list of python modules installed. Is there a way by which I could change the way I get the output?

For example: pip freeze gives me:

  1. Landscape-Client==14.12
  2. PAM==0.4.2
  3. Twisted-Core==13.2.0
  4. apt-xapian-index==0.45
  5. argparse==1.2.1

Is there a way that I could change this to display:

  1. Landscape-Client-14.12
  2. PAM-0.4.2
  3. Twisted-Core-13.2.0
  4. apt-xapian-index-0.45
  5. argparse-1.2.1

Also, is there a way to get the list of all python components - both from pip & pip3 or do I have to run the command individually?

The way I am looking at it is to see if we can somehow control the output that pip or pip3 gives us.

Metahuman
  • 192
  • 1
  • 2
  • 10

1 Answers1

0

pip list outputs like the following

adium-theme-ubuntu (0.3.4)
appdirs (1.4.0)
argh (0.26.2)
args (0.1.0)
Babel (2.3.4)
BeautifulSoup (3.2.1)
cffi (1.9.1)
click (6.7)
clint (0.5.1)
colorama (0.3.7)
compass-stylesheets (1.0.2)
cryptography (1.7.2)
Cython (0.23)
decorator (4.0.11)
Django (1.10.5)
django-request (1.5.1)
djangorestframework (3.5.4)
docutils (0.13.1)
enum34 (1.1.6)
future (0.16.0)
get (0.0.0)
gitdb (0.6.4)
gitdb2 (2.0.0)
GitPython (2.1.1)
gyp (0.1)
httplib2 (0.10.3)
idna (2.2)
image (1.5.5)
influxdb (4.0.0)
ipaddress (1.0.18)
jedi (0.10.0)
Kivy (1.9.1)
Kivy-Garden (0.1.4)
Markdown (2.6.8)
monkeylearn (0.3.6)
networkx (1.11)
numpy (1.12.0)
olefile (0.44)
packaging (16.8)
pandas (0.19.2)
pathlib (1.0.1)
pathtools (0.1.2)
pefile (2016.3.28)
Pillow (4.0.0)
pip (9.0.1)
pkginfo (1.4.1)
post (0.0.0)
public (0.0.0)
pyasn1 (0.2.2)
pycparser (2.17)
pycrypto (2.6.1)
pycryptodome (3.4.5)
pyglet (1.2.4)
Pygments (2.2.0)
pygobject (3.22.0)
pyOpenSSL (16.2.0)
pyparsing (2.1.10)
PyPDF2 (1.26.0)
pyScss (1.3.5)
pystache (0.5.4)
Pyste (0.9.10)
python-dateutil (2.6.0)
pytz (2016.10)
pyxdg (0.25)
PyYAML (3.12)
query-string (0.0.0)
request (0.0.0)
requests (2.13.0)
requests-toolbelt (0.7.1)
rsa (3.4.2)
setupfiles (0.0.0)
setuptools (34.2.0)
simplejson (3.10.0)
six (1.10.0)
smmap (0.9.0)
smmap2 (2.0.1)
swapper (1.0.0)
twine (1.8.1)
ubuntuone-client-data (14.4)
unity-lens-photos (1.0)
urllib3 (1.21.1)
virtualenv (15.1.0)
watchdog (0.8.3)
wheel (0.29.0)

I've never tried to supply additional commands to "list" but as it was pointed out you could write a script.

I'm not quite sure what you mean by "All python components" as that's very broad.

The "pip freeze" commands outputs installed packages in requirements format.

pip list just outputs all locally installed packages along with their version in a somewhat cleaner format. Could you perhaps give me more information as to what you meant by "all python components" in case this answer doesn't help?

suroh
  • 865
  • 8
  • 21