Name | pipdeptree JSON |
Version |
2.24.0
JSON |
| download |
home_page | None |
Summary | Command line utility to show dependency tree of packages. |
upload_time | 2024-11-26 01:56:59 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | Copyright (c) The pipdeptree developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
application
cache
directory
log
user
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pipdeptree
[![PyPI](https://img.shields.io/pypi/v/pipdeptree)](https://pypi.org/project/pipdeptree/)
[![Supported Python
versions](https://img.shields.io/pypi/pyversions/pipdeptree.svg)](https://pypi.org/project/pipdeptree/)
[![Downloads](https://static.pepy.tech/badge/pipdeptree/month)](https://pepy.tech/project/pipdeptree)
[![check](https://github.com/tox-dev/pipdeptree/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/pipdeptree/actions/workflows/check.yaml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/tox-dev/pipdeptree/main.svg)](https://results.pre-commit.ci/latest/github/tox-dev/pipdeptree/main)
`pipdeptree` is a command line utility for displaying the installed python packages in form of a dependency tree. It
works for packages installed globally on a machine as well as in a virtualenv. Since `pip freeze` shows all dependencies
as a flat list, finding out which are the top level packages and which packages do they depend on requires some effort.
It\'s also tedious to resolve conflicting dependencies that could have been installed because older version of `pip`
didn\'t have true dependency resolution[^1]. `pipdeptree` can help here by identifying conflicting dependencies
installed in the environment.
To some extent, `pipdeptree` is inspired by the `lein deps :tree` command of [Leiningen](http://leiningen.org/).
## Installation
```bash
pip install pipdeptree
```
## Running in virtualenvs
`New in ver. 2.0.0`
If you want to run pipdeptree in the context of a particular virtualenv, you can specify the `--python` option. Note
that this capability has been recently added in version `2.0.0`.
Alternatively, you may also install pipdeptree inside the virtualenv and then run it from there.
As of version `2.21.0`, you may also pass `--python auto`, where it will attempt to detect your virtual environment and grab the interpreter from there. It will fail if it is unable to detect one.
## Usage and examples
To give you a brief idea, here is the output of `pipdeptree` compared with `pip freeze`:
```bash
$ pip freeze
Flask==0.10.1
itsdangerous==0.24
Jinja2==2.11.2
-e git+git@github.com:naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy
MarkupSafe==0.22
pipdeptree @ file:///private/tmp/pipdeptree-2.0.0b1-py3-none-any.whl
Werkzeug==0.11.2
```
And now see what `pipdeptree` outputs,
```bash
$ pipdeptree
Warning!!! Possibly conflicting dependencies found:
* Jinja2==2.11.2
- MarkupSafe [required: >=0.23, installed: 0.22]
------------------------------------------------------------------------
Flask==0.10.1
- itsdangerous [required: >=0.21, installed: 0.24]
- Jinja2 [required: >=2.4, installed: 2.11.2]
- MarkupSafe [required: >=0.23, installed: 0.22]
- Werkzeug [required: >=0.7, installed: 0.11.2]
Lookupy==0.1
pipdeptree==2.0.0b1
- pip [required: >=6.0.0, installed: 20.1.1]
setuptools==47.1.1
wheel==0.34.2
```
## Is it possible to find out why a particular package is installed?
`New in ver. 0.5.0`
Yes, there\'s a `--reverse` (or simply `-r`) flag for this. To find out which packages depend on a particular
package(s), it can be combined with `--packages` option as follows:
```bash
$ pipdeptree --reverse --packages itsdangerous,MarkupSafe
Warning!!! Possibly conflicting dependencies found:
* Jinja2==2.11.2
- MarkupSafe [required: >=0.23, installed: 0.22]
------------------------------------------------------------------------
itsdangerous==0.24
- Flask==0.10.1 [requires: itsdangerous>=0.21]
MarkupSafe==0.22
- Jinja2==2.11.2 [requires: MarkupSafe>=0.23]
- Flask==0.10.1 [requires: Jinja2>=2.4]
```
## What\'s with the warning about conflicting dependencies?
As seen in the above output, `pipdeptree` by default warns about possible conflicting dependencies. Any package that\'s
specified as a dependency of multiple packages with different versions is considered as a conflicting dependency.
Conflicting dependencies are possible if older version of pip\<=20.2
([without the new resolver](https://github.com/pypa/pip/issues/988)[^2]) was ever used to install dependencies at some
point. The warning is printed to stderr instead of stdout and it can be completely silenced by specifying the
`-w silence` or `--warn silence` option. On the other hand, it can be made mode strict with `--warn fail`, in which case
the command will not only print the warnings to stderr but also exit with a non-zero status code. This is useful if you
want to fit this tool into your CI pipeline.
**Note**: The `--warn` option is added in version `0.6.0`. If you are using an older version, use `--nowarn` flag to
silence the warnings.
## Warnings about circular dependencies
In case any of the packages have circular dependencies (eg. package A depends on package B and package B depends on
package A), then `pipdeptree` will print warnings about that as well.
```bash
$ pipdeptree --exclude pip,pipdeptree,setuptools,wheel
Warning!!! Cyclic dependencies found:
- CircularDependencyA => CircularDependencyB => CircularDependencyA
- CircularDependencyB => CircularDependencyA => CircularDependencyB
------------------------------------------------------------------------
wsgiref==0.1.2
argparse==1.2.1
```
Similar to the warnings about conflicting dependencies, these too are printed to stderr and can be controlled using the
`--warn` option.
In the above example, you can also see `--exclude` option which is the opposite of `--packages` ie. these packages will
be excluded from the output.
## Using pipdeptree to write requirements.txt file
If you wish to track only top level packages in your `requirements.txt` file, it\'s possible by grep-ing[^3]. only the
top-level lines from the output,
```bash
$ pipdeptree --warn silence | grep -E '^\w+'
Flask==0.10.1
gnureadline==8.0.0
Lookupy==0.1
pipdeptree==2.0.0b1
setuptools==47.1.1
wheel==0.34.2
```
There is a problem here though - The output doesn\'t mention anything about `Lookupy` being installed as an _editable_
package (refer to the output of `pip freeze` above) and information about its source is lost. To fix this, `pipdeptree`
must be run with a `-f` or `--freeze` flag.
```bash
$ pipdeptree -f --warn silence | grep -E '^[a-zA-Z0-9\-]+'
Flask==0.10.1
gnureadline==8.0.0
-e git+git@github.com:naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy
pipdeptree @ file:///private/tmp/pipdeptree-2.0.0b1-py3-none-any.whl
setuptools==47.1.1
wheel==0.34.2
$ pipdeptree -f --warn silence | grep -E '^[a-zA-Z0-9\-]+' > requirements.txt
```
The freeze flag will not prefix child dependencies with hyphens, so you could dump the entire output of `pipdeptree -f`
to the requirements.txt file thus making it human-friendly (due to indentations) as well as pip-friendly.
```bash
$ pipdeptree -f | tee locked-requirements.txt
Flask==0.10.1
itsdangerous==0.24
Jinja2==2.11.2
MarkupSafe==0.23
Werkzeug==0.11.2
gnureadline==8.0.0
-e git+git@github.com:naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy
pipdeptree @ file:///private/tmp/pipdeptree-2.0.0b1-py3-none-any.whl
pip==20.1.1
setuptools==47.1.1
wheel==0.34.2
```
On confirming that there are no conflicting dependencies, you can even treat this as a \"lock file\" where all packages,
including the transient dependencies will be pinned to their currently installed versions. Note that the
`locked-requirements.txt` file could end up with duplicate entries. Although `pip install` wouldn\'t complain about
that, you can avoid duplicate lines (at the cost of losing indentation) as follows,
```bash
$ pipdeptree -f | sed 's/ //g' | sort -u > locked-requirements.txt
```
## Using pipdeptree with external tools
`New in ver. 0.5.0`
It\'s also possible to have `pipdeptree` output json representation of the dependency tree so that it may be used as
input to other external tools.
```bash
$ pipdeptree --json
```
Note that `--json` will output a flat list of all packages with their immediate dependencies. This is not very useful in
itself. To obtain nested json, use `--json-tree`
`New in ver. 0.11.0`
```bash
$ pipdeptree --json-tree
```
## Visualizing the dependency graph
The dependency graph can also be visualized using [GraphViz](http://www.graphviz.org/):
```bash
$ pipdeptree --graph-output dot > dependencies.dot
$ pipdeptree --graph-output pdf > dependencies.pdf
$ pipdeptree --graph-output png > dependencies.png
$ pipdeptree --graph-output svg > dependencies.svg
```
Note that `graphviz` is an optional dependency ie. required only if you want to use `--graph-output`. If the version of
`graphviz` installed in the env is older than 0.18.1, then a warning will be displayed about upgrading `graphviz`.
Support for older versions of graphviz will be dropped soon.
Since version `2.0.0b1`, `--package` and `--reverse` flags are supported for all output formats ie. text, json,
json-tree and graph.
In earlier versions, `--json`, `--json-tree` and `--graph-output` options override `--package` and `--reverse`.
## Usage
```bash
% pipdeptree --help
usage: pipdeptree [-h] [-v] [-w [{silence,suppress,fail}]] [--python PYTHON] [-p P] [-e P] [-a] [-l | -u] [-f] [--encoding E] [-d D] [-r] [--license] [-j | --json-tree | --mermaid | --graph-output FMT]
Dependency tree of the installed python packages
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-w [{silence,suppress,fail}], --warn [{silence,suppress,fail}]
warning control: suppress will show warnings but return 0 whether or not they are present; silence will not show warnings at all and always return 0; fail will show warnings and return 1 if any are present (default:
suppress)
select:
choose what to render
--python PYTHON Python interpreter to inspect (default: /usr/local/bin/python)
--path PATH Passes a path used to restrict where packages should be looked for (can be used multiple times) (default: None)
-p P, --packages P comma separated list of packages to show - wildcards are supported, like 'somepackage.*' (default: None)
-e P, --exclude P comma separated list of packages to not show - wildcards are supported, like 'somepackage.*'. (cannot combine with -p or -a) (default: None)
-a, --all list all deps at top level (default: False)
-l, --local-only if in a virtualenv that has global access do not show globally installed packages (default: False)
-u, --user-only only show installations in the user site dir (default: False)
render:
choose how to render the dependency tree (by default will use text mode)
-f, --freeze print names so as to write freeze files (default: False)
--encoding E the encoding to use when writing to the output (default: utf-8)
-d D, --depth D limit the depth of the tree (text render only) (default: inf)
-r, --reverse render the dependency tree in the reverse fashion ie. the sub-dependencies are listed with the list of packages that need them under them (default: False)
--license list the license(s) of a package (text render only) (default: False)
-j, --json raw JSON - this will yield output that may be used by external tools (default: False)
--json-tree nested JSON - mimics the text format layout (default: False)
--mermaid https://mermaid.js.org flow diagram (default: False)
--graph-output FMT Graphviz rendering with the value being the graphviz output e.g.: dot, jpeg, pdf, png, svg (default: None)
```
## Known issues
1. `pipdeptree` relies on the internal API of `pip`. I fully understand that it\'s a bad idea but it mostly works! On
rare occasions, it breaks when a new version of `pip` is out with backward incompatible changes in internal API. So
beware if you are using this tool in environments in which `pip` version is unpinned, specially automation or CD/CI
pipelines.
## Limitations & Alternatives
`pipdeptree` merely looks at the installed packages in the current environment using pip, constructs the tree, then
outputs it in the specified format. If you want to generate the dependency tree without installing the packages, then
you need a dependency resolver. You might want to check alternatives such as
[pipgrip](https://github.com/ddelange/pipgrip) or [poetry](https://github.com/python-poetry/poetry).
## License
MIT (See [LICENSE](./LICENSE))
## Footnotes
[^1]:
pip version 20.3 has been released in Nov 2020 with the dependency resolver
\<<https://blog.python.org/2020/11/pip-20-3-release-new-resolver.html>\>\_
[^2]:
pip version 20.3 has been released in Nov 2020 with the dependency resolver
\<<https://blog.python.org/2020/11/pip-20-3-release-new-resolver.html>\>\_
[^3]:
If you are on windows (powershell) you can run `pipdeptree --warn silence | Select-String -Pattern '^\w+'` instead
of grep
Raw data
{
"_id": null,
"home_page": null,
"name": "pipdeptree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Bern\u00e1t G\u00e1bor <gaborjbernat@gmail.com>, Vineet Naik <naikvin@gmail.com>",
"keywords": "application, cache, directory, log, user",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/7e/01/a3c3bdbf1bb50e0c675c76a65071fdbc80dbe92e8ec7959b7ba81c642769/pipdeptree-2.24.0.tar.gz",
"platform": null,
"description": "# pipdeptree\n\n[![PyPI](https://img.shields.io/pypi/v/pipdeptree)](https://pypi.org/project/pipdeptree/)\n[![Supported Python\nversions](https://img.shields.io/pypi/pyversions/pipdeptree.svg)](https://pypi.org/project/pipdeptree/)\n[![Downloads](https://static.pepy.tech/badge/pipdeptree/month)](https://pepy.tech/project/pipdeptree)\n[![check](https://github.com/tox-dev/pipdeptree/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/pipdeptree/actions/workflows/check.yaml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/tox-dev/pipdeptree/main.svg)](https://results.pre-commit.ci/latest/github/tox-dev/pipdeptree/main)\n\n`pipdeptree` is a command line utility for displaying the installed python packages in form of a dependency tree. It\nworks for packages installed globally on a machine as well as in a virtualenv. Since `pip freeze` shows all dependencies\nas a flat list, finding out which are the top level packages and which packages do they depend on requires some effort.\nIt\\'s also tedious to resolve conflicting dependencies that could have been installed because older version of `pip`\ndidn\\'t have true dependency resolution[^1]. `pipdeptree` can help here by identifying conflicting dependencies\ninstalled in the environment.\n\nTo some extent, `pipdeptree` is inspired by the `lein deps :tree` command of [Leiningen](http://leiningen.org/).\n\n## Installation\n\n```bash\npip install pipdeptree\n```\n\n## Running in virtualenvs\n\n`New in ver. 2.0.0`\n\nIf you want to run pipdeptree in the context of a particular virtualenv, you can specify the `--python` option. Note\nthat this capability has been recently added in version `2.0.0`.\n\nAlternatively, you may also install pipdeptree inside the virtualenv and then run it from there.\n\nAs of version `2.21.0`, you may also pass `--python auto`, where it will attempt to detect your virtual environment and grab the interpreter from there. It will fail if it is unable to detect one.\n\n## Usage and examples\n\nTo give you a brief idea, here is the output of `pipdeptree` compared with `pip freeze`:\n\n```bash\n$ pip freeze\nFlask==0.10.1\nitsdangerous==0.24\nJinja2==2.11.2\n-e git+git@github.com:naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy\nMarkupSafe==0.22\npipdeptree @ file:///private/tmp/pipdeptree-2.0.0b1-py3-none-any.whl\nWerkzeug==0.11.2\n```\n\nAnd now see what `pipdeptree` outputs,\n\n```bash\n$ pipdeptree\nWarning!!! Possibly conflicting dependencies found:\n* Jinja2==2.11.2\n - MarkupSafe [required: >=0.23, installed: 0.22]\n------------------------------------------------------------------------\nFlask==0.10.1\n - itsdangerous [required: >=0.21, installed: 0.24]\n - Jinja2 [required: >=2.4, installed: 2.11.2]\n - MarkupSafe [required: >=0.23, installed: 0.22]\n - Werkzeug [required: >=0.7, installed: 0.11.2]\nLookupy==0.1\npipdeptree==2.0.0b1\n - pip [required: >=6.0.0, installed: 20.1.1]\nsetuptools==47.1.1\nwheel==0.34.2\n```\n\n## Is it possible to find out why a particular package is installed?\n\n`New in ver. 0.5.0`\n\nYes, there\\'s a `--reverse` (or simply `-r`) flag for this. To find out which packages depend on a particular\npackage(s), it can be combined with `--packages` option as follows:\n\n```bash\n$ pipdeptree --reverse --packages itsdangerous,MarkupSafe\nWarning!!! Possibly conflicting dependencies found:\n* Jinja2==2.11.2\n - MarkupSafe [required: >=0.23, installed: 0.22]\n------------------------------------------------------------------------\nitsdangerous==0.24\n - Flask==0.10.1 [requires: itsdangerous>=0.21]\nMarkupSafe==0.22\n - Jinja2==2.11.2 [requires: MarkupSafe>=0.23]\n - Flask==0.10.1 [requires: Jinja2>=2.4]\n```\n\n## What\\'s with the warning about conflicting dependencies?\n\nAs seen in the above output, `pipdeptree` by default warns about possible conflicting dependencies. Any package that\\'s\nspecified as a dependency of multiple packages with different versions is considered as a conflicting dependency.\nConflicting dependencies are possible if older version of pip\\<=20.2\n([without the new resolver](https://github.com/pypa/pip/issues/988)[^2]) was ever used to install dependencies at some\npoint. The warning is printed to stderr instead of stdout and it can be completely silenced by specifying the\n`-w silence` or `--warn silence` option. On the other hand, it can be made mode strict with `--warn fail`, in which case\nthe command will not only print the warnings to stderr but also exit with a non-zero status code. This is useful if you\nwant to fit this tool into your CI pipeline.\n\n**Note**: The `--warn` option is added in version `0.6.0`. If you are using an older version, use `--nowarn` flag to\nsilence the warnings.\n\n## Warnings about circular dependencies\n\nIn case any of the packages have circular dependencies (eg. package A depends on package B and package B depends on\npackage A), then `pipdeptree` will print warnings about that as well.\n\n```bash\n$ pipdeptree --exclude pip,pipdeptree,setuptools,wheel\nWarning!!! Cyclic dependencies found:\n- CircularDependencyA => CircularDependencyB => CircularDependencyA\n- CircularDependencyB => CircularDependencyA => CircularDependencyB\n------------------------------------------------------------------------\nwsgiref==0.1.2\nargparse==1.2.1\n```\n\nSimilar to the warnings about conflicting dependencies, these too are printed to stderr and can be controlled using the\n`--warn` option.\n\nIn the above example, you can also see `--exclude` option which is the opposite of `--packages` ie. these packages will\nbe excluded from the output.\n\n## Using pipdeptree to write requirements.txt file\n\nIf you wish to track only top level packages in your `requirements.txt` file, it\\'s possible by grep-ing[^3]. only the\ntop-level lines from the output,\n\n```bash\n$ pipdeptree --warn silence | grep -E '^\\w+'\nFlask==0.10.1\ngnureadline==8.0.0\nLookupy==0.1\npipdeptree==2.0.0b1\nsetuptools==47.1.1\nwheel==0.34.2\n```\n\nThere is a problem here though - The output doesn\\'t mention anything about `Lookupy` being installed as an _editable_\npackage (refer to the output of `pip freeze` above) and information about its source is lost. To fix this, `pipdeptree`\nmust be run with a `-f` or `--freeze` flag.\n\n```bash\n$ pipdeptree -f --warn silence | grep -E '^[a-zA-Z0-9\\-]+'\nFlask==0.10.1\ngnureadline==8.0.0\n-e git+git@github.com:naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy\npipdeptree @ file:///private/tmp/pipdeptree-2.0.0b1-py3-none-any.whl\nsetuptools==47.1.1\nwheel==0.34.2\n\n$ pipdeptree -f --warn silence | grep -E '^[a-zA-Z0-9\\-]+' > requirements.txt\n```\n\nThe freeze flag will not prefix child dependencies with hyphens, so you could dump the entire output of `pipdeptree -f`\nto the requirements.txt file thus making it human-friendly (due to indentations) as well as pip-friendly.\n\n```bash\n$ pipdeptree -f | tee locked-requirements.txt\nFlask==0.10.1\n itsdangerous==0.24\n Jinja2==2.11.2\n MarkupSafe==0.23\n Werkzeug==0.11.2\ngnureadline==8.0.0\n-e git+git@github.com:naiquevin/lookupy.git@cdbe30c160e1c29802df75e145ea4ad903c05386#egg=Lookupy\npipdeptree @ file:///private/tmp/pipdeptree-2.0.0b1-py3-none-any.whl\n pip==20.1.1\nsetuptools==47.1.1\nwheel==0.34.2\n```\n\nOn confirming that there are no conflicting dependencies, you can even treat this as a \\\"lock file\\\" where all packages,\nincluding the transient dependencies will be pinned to their currently installed versions. Note that the\n`locked-requirements.txt` file could end up with duplicate entries. Although `pip install` wouldn\\'t complain about\nthat, you can avoid duplicate lines (at the cost of losing indentation) as follows,\n\n```bash\n$ pipdeptree -f | sed 's/ //g' | sort -u > locked-requirements.txt\n```\n\n## Using pipdeptree with external tools\n\n`New in ver. 0.5.0`\n\nIt\\'s also possible to have `pipdeptree` output json representation of the dependency tree so that it may be used as\ninput to other external tools.\n\n```bash\n$ pipdeptree --json\n```\n\nNote that `--json` will output a flat list of all packages with their immediate dependencies. This is not very useful in\nitself. To obtain nested json, use `--json-tree`\n\n`New in ver. 0.11.0`\n\n```bash\n$ pipdeptree --json-tree\n```\n\n## Visualizing the dependency graph\n\nThe dependency graph can also be visualized using [GraphViz](http://www.graphviz.org/):\n\n```bash\n$ pipdeptree --graph-output dot > dependencies.dot\n$ pipdeptree --graph-output pdf > dependencies.pdf\n$ pipdeptree --graph-output png > dependencies.png\n$ pipdeptree --graph-output svg > dependencies.svg\n```\n\nNote that `graphviz` is an optional dependency ie. required only if you want to use `--graph-output`. If the version of\n`graphviz` installed in the env is older than 0.18.1, then a warning will be displayed about upgrading `graphviz`.\nSupport for older versions of graphviz will be dropped soon.\n\nSince version `2.0.0b1`, `--package` and `--reverse` flags are supported for all output formats ie. text, json,\njson-tree and graph.\n\nIn earlier versions, `--json`, `--json-tree` and `--graph-output` options override `--package` and `--reverse`.\n\n## Usage\n\n```bash\n% pipdeptree --help\nusage: pipdeptree [-h] [-v] [-w [{silence,suppress,fail}]] [--python PYTHON] [-p P] [-e P] [-a] [-l | -u] [-f] [--encoding E] [-d D] [-r] [--license] [-j | --json-tree | --mermaid | --graph-output FMT]\n\nDependency tree of the installed python packages\n\noptions:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n -w [{silence,suppress,fail}], --warn [{silence,suppress,fail}]\n warning control: suppress will show warnings but return 0 whether or not they are present; silence will not show warnings at all and always return 0; fail will show warnings and return 1 if any are present (default:\n suppress)\n\nselect:\n choose what to render\n\n --python PYTHON Python interpreter to inspect (default: /usr/local/bin/python)\n --path PATH Passes a path used to restrict where packages should be looked for (can be used multiple times) (default: None)\n -p P, --packages P comma separated list of packages to show - wildcards are supported, like 'somepackage.*' (default: None)\n -e P, --exclude P comma separated list of packages to not show - wildcards are supported, like 'somepackage.*'. (cannot combine with -p or -a) (default: None)\n -a, --all list all deps at top level (default: False)\n -l, --local-only if in a virtualenv that has global access do not show globally installed packages (default: False)\n -u, --user-only only show installations in the user site dir (default: False)\n\nrender:\n choose how to render the dependency tree (by default will use text mode)\n\n -f, --freeze print names so as to write freeze files (default: False)\n --encoding E the encoding to use when writing to the output (default: utf-8)\n -d D, --depth D limit the depth of the tree (text render only) (default: inf)\n -r, --reverse render the dependency tree in the reverse fashion ie. the sub-dependencies are listed with the list of packages that need them under them (default: False)\n --license list the license(s) of a package (text render only) (default: False)\n -j, --json raw JSON - this will yield output that may be used by external tools (default: False)\n --json-tree nested JSON - mimics the text format layout (default: False)\n --mermaid https://mermaid.js.org flow diagram (default: False)\n --graph-output FMT Graphviz rendering with the value being the graphviz output e.g.: dot, jpeg, pdf, png, svg (default: None)\n```\n\n## Known issues\n\n1. `pipdeptree` relies on the internal API of `pip`. I fully understand that it\\'s a bad idea but it mostly works! On\n rare occasions, it breaks when a new version of `pip` is out with backward incompatible changes in internal API. So\n beware if you are using this tool in environments in which `pip` version is unpinned, specially automation or CD/CI\n pipelines.\n\n## Limitations & Alternatives\n\n`pipdeptree` merely looks at the installed packages in the current environment using pip, constructs the tree, then\noutputs it in the specified format. If you want to generate the dependency tree without installing the packages, then\nyou need a dependency resolver. You might want to check alternatives such as\n[pipgrip](https://github.com/ddelange/pipgrip) or [poetry](https://github.com/python-poetry/poetry).\n\n## License\n\nMIT (See [LICENSE](./LICENSE))\n\n## Footnotes\n\n[^1]:\n pip version 20.3 has been released in Nov 2020 with the dependency resolver\n \\<<https://blog.python.org/2020/11/pip-20-3-release-new-resolver.html>\\>\\_\n\n[^2]:\n pip version 20.3 has been released in Nov 2020 with the dependency resolver\n \\<<https://blog.python.org/2020/11/pip-20-3-release-new-resolver.html>\\>\\_\n\n[^3]:\n If you are on windows (powershell) you can run `pipdeptree --warn silence | Select-String -Pattern '^\\w+'` instead\n of grep\n",
"bugtrack_url": null,
"license": "Copyright (c) The pipdeptree developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Command line utility to show dependency tree of packages.",
"version": "2.24.0",
"project_urls": {
"Changelog": "https://github.com/tox-dev/pipdeptree/releases",
"Documentation": "https://github.com/tox-dev/pipdeptree/blob/main/README.md#pipdeptree",
"Homepage": "https://github.com/tox-dev/pipdeptree",
"Source": "https://github.com/tox-dev/pipdeptree",
"Tracker": "https://github.com/tox-dev/pipdeptree/issues"
},
"split_keywords": [
"application",
" cache",
" directory",
" log",
" user"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9bb9607fc5e163e0c0e90cafcdb9721d80f26bd8883e1077bcca0b9db045f6f0",
"md5": "36dacfb88c4aa15a7e4c2d7ae1f1d8f1",
"sha256": "97a455ee53cfa3dfe07223a985e4d473ac96a8b9e953d7db7f27a5e893865023"
},
"downloads": -1,
"filename": "pipdeptree-2.24.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36dacfb88c4aa15a7e4c2d7ae1f1d8f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 32441,
"upload_time": "2024-11-26T01:56:57",
"upload_time_iso_8601": "2024-11-26T01:56:57.809909Z",
"url": "https://files.pythonhosted.org/packages/9b/b9/607fc5e163e0c0e90cafcdb9721d80f26bd8883e1077bcca0b9db045f6f0/pipdeptree-2.24.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7e01a3c3bdbf1bb50e0c675c76a65071fdbc80dbe92e8ec7959b7ba81c642769",
"md5": "af2330294c6993202a3323e695cc9aca",
"sha256": "d520e165535e217dd8958dfc14f1922efa0f6e4ff16126a61edb7ed6c538a930"
},
"downloads": -1,
"filename": "pipdeptree-2.24.0.tar.gz",
"has_sig": false,
"md5_digest": "af2330294c6993202a3323e695cc9aca",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 40363,
"upload_time": "2024-11-26T01:56:59",
"upload_time_iso_8601": "2024-11-26T01:56:59.905062Z",
"url": "https://files.pythonhosted.org/packages/7e/01/a3c3bdbf1bb50e0c675c76a65071fdbc80dbe92e8ec7959b7ba81c642769/pipdeptree-2.24.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-26 01:56:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tox-dev",
"github_project": "pipdeptree",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pipdeptree"
}