Display installed Python projects as a tree of dependencies
Project description
1 Introduction
Display installed Python projects as a tree of dependencies.
2 Features
Output compatible with requirements.txt
Show dependencies or dependents
Detects circular dependencies
Detects missing dependencies
3 Usage
usage: deptree [-h] [--version] [-r] [project [project ...]]
positional arguments:
project name of project whose dependencies (or dependents) to show
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-r, --reverse show dependent projects instead of dependencies
3.1 Examples
$ deptree twine
twine==2.0.0 # twine
pkginfo==1.5.0.1 # pkginfo>=1.4.2
readme-renderer==24.0 # readme-renderer>=21.0
bleach==3.1.0 # bleach>=2.1.0
six==1.13.0 # six>=1.9.0
webencodings==0.5.1 # webencodings
docutils==0.15.2 # docutils>=0.13.1
Pygments==2.4.2 # Pygments
six==1.13.0 # six
requests==2.22.0 # requests>=2.20
certifi==2019.9.11 # certifi>=2017.4.17
chardet==3.0.4 # chardet<3.1.0,>=3.0.2
idna==2.8 # idna<2.9,>=2.5
urllib3==1.25.7 # urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
requests-toolbelt==0.9.1 # requests-toolbelt!=0.9.0,>=0.8.0
requests==2.22.0 # requests<3.0.0,>=2.0.1
certifi==2019.9.11 # certifi>=2017.4.17
chardet==3.0.4 # chardet<3.1.0,>=3.0.2
idna==2.8 # idna<2.9,>=2.5
urllib3==1.25.7 # urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
setuptools==39.0.1 # setuptools>=0.7.0
tqdm==4.38.0 # tqdm>=4.14
$ deptree -r requests
requests==2.22.0 #
requests-toolbelt==0.9.1 # requests<3.0.0,>=2.0.1
twine==2.0.0 # requests-toolbelt!=0.9.0,>=0.8.0
twine==2.0.0 # requests>=2.20
4 Repositories
4.1 Distributions
4.2 Source code
5 Details
Similar projects
6 Hacking
This project makes extensive use of tox, pytest, and GNU Make.
6.1 Development environment
Use following command to create a Python virtual environment with all necessary dependencies:
tox --recreate -e develop
This creates a Python virtual environment in the .tox/develop directory. It can be activated with the following command:
. .tox/develop/bin/activate
6.2 Run test suite
In a Python virtual environment run the following command:
make review
Outside of a Python virtual environment run the following command:
tox --recreate
6.3 Build and package
In a Python virtual environment run the following command:
make package
Outside of a Python virtual environment run the following command:
tox --recreate -e package
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.