Python Forum
to get a list of pip packages that were installed
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
to get a list of pip packages that were installed
#6
(Jun-01-2022, 06:27 AM)Skaperen Wrote: now, i am curious how those other 93 package got installed, some of them i have no idea what they do.
As mention so can one pip install have many sub dependencies that get installed.
93 is not a lot at all,i did help someone with install of a machine learning project this one project did install 100 package's.
pip list gives packages without version as freeze do.
Not recommend to move over all for OS install,a least pip list will install new packages and not many old as freeze(make more sense if done in virtual environment)
pip list > requirements.txt
# New OS or virtual enviroment
pip install -r requirements.txt
If want have full control over dependencies look a Poetry
It's a great tool for Python packaging and dependency management.
Will give tree of what eg Request has as sub dependencies.
Quick demo.
G:\div_code
λ poetry --version
Poetry version 1.1.13

G:\div_code
λ poetry new request_test
Created package request_test in request_test

G:\div_code
λ cd request_test\

# Install Requests
G:\div_code\request_test
λ poetry add requests
Using version ^2.27.1 for requests
.....

# Show dependencies that installed and needed bye Requests 
G:\div_code\request_test
λ poetry show requests
name         : requests
version      : 2.27.1
description  : Python HTTP for Humans.

dependencies
 - certifi >=2017.4.17
 - charset-normalizer >=2.0.0,<2.1.0
 - idna >=2.5,<4
 - urllib3 >=1.21.1,<1.27

# Show in tree view,pytest is a default install
G:\div_code\request_test
λ poetry show --tree
pytest 5.4.3 pytest: simple powerful testing with Python
├── atomicwrites >=1.0
├── attrs >=17.4.0
├── colorama *
├── more-itertools >=4.0.0
├── packaging *
│   └── pyparsing >=2.0.2,<3.0.5 || >3.0.5
├── pluggy >=0.12,<1.0
├── py >=1.5.0
└── wcwidth *
requests 2.27.1 Python HTTP for Humans.
├── certifi >=2017.4.17
├── charset-normalizer >=2.0.0,<2.1.0
├── idna >=2.5,<4
└── urllib3 >=1.21.1,<1.27
Gribouillis likes this post
Reply


Messages In This Thread
RE: to get a list of pip packages that were installed - by snippsat - Jun-01-2022, 08:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  what pip command can list installed files for a name package? Skaperen 3 2,228 Aug-04-2020, 10:15 PM
Last Post: Skaperen
  pip list available packages Skaperen 16 36,866 Oct-31-2017, 12:36 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020