2

When running pip list or pip freeze, is there a way to emit additional details for each package?

Further details:

In our project, we must report the packages we're using, their origin and their license. What I'm trying to retrieve would be similar to e.g.:

Package       Version PyPi Link                       License                   
------------- ------- ------------------------------- --------------------------
Flask         1.1.2   https://pypi.org/project/Flask/ BSD License (BSD-3-Clause)
Others...     1.2.3   ...                             ...

Entries I'm trying to find besides PyPi Link:

  • PyPi Link
  • Homepage (https://palletsprojects.com/p/flask/ in case of flask)
  • Code (https://github.com/pallets/flask in case of flask)
  • License (BSD License (BSD-3-Clause) in case of Flask)

1 Answer 1

3

If you run pip show <name> (documentation) it would give you more details including the license, and I believe any additional link metadata within the package. If you have a requirements.txt file in your project you can do a bash(linux/mac) or PowerShell(windows) script to run the command for each dependency if doing it one at a time is too much hassle.

You can also use the--verbose to get even more details like classifiers etc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.