Registry / devops / johnnydep

johnnydep

JSON →
library2.1.0pypypi✓ verified 84d ago

Johnnydep is a Python tool designed to display the dependency tree of Python distribution packages in a clear, tree-like structure. It helps developers efficiently manage project dependencies by visualizing all required components and their version constraints. The current version is 1.20.6, and it sees active development with frequent minor releases to support new `pip` versions and fix regressions.

pip install johnnydep
INSTALL
IMPORT
SIG · JOHNNYDEP
J
johnnydep
devopspythonv2.1.0
Install
4.3s avg
Import
878ms
Disk
38MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.911s · 38.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.3s · import 0.844s · 40MB
38MB installed
● package 38MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JohnnyDist
from johnnydep.lib import JohnnyDist
Main class for representing a Python distribution and its dependencies programmatically.
gen_tree
from johnnydep.lib import gen_tree
Function to generate a rich.tree.Tree object from a JohnnyDist instance.
gen_table
from johnnydep.lib import gen_table
Function to generate a rich.table.Table object from a JohnnyDist instance.
flatten_deps
from johnnydep.lib import flatten_deps
Function to flatten a dependency tree into a list.

Display the dependency tree for the 'requests' package directly from the command line.

johnnydep requests
johnnydep --version
Debug
Known issues
breakingThe `dist.console_scripts` attribute, used for programmatic access to console script entry points, changed its return type from a comma-separated string to a `list` of strings in version 1.20.0.
fix
Update any code relying on `dist.console_scripts` to expect a list of strings and iterate over it or join as needed, instead of splitting a string.
affects: <1.20.0
gotchaJohnnydep has had compatibility issues with specific `pip` versions, requiring updates. For instance, v1.20.5 added support for `pip>24`, and v1.20.4 fixed a regression with `pip 23.3`.
fix
Ensure you are running the latest version of `johnnydep`. If encountering dependency resolution or parsing errors, try upgrading `johnnydep` with `pip install --upgrade johnnydep`.
affects: <1.20.5
gotchaVersion 1.20.1 blacklisted `packaging v22.0` due to an internal bug in that `packaging` release which could cause `johnnydep` to fail.
fix
If running `johnnydep` with `packaging==22.0`, upgrade `packaging` to a newer version (e.g., `pip install --upgrade packaging`) or downgrade `packaging` if necessary.
affects: 1.20.1
Errors
Common errors & fixes
johnnydep: command not found
The `johnnydep` command-line tool is not installed, or your system's PATH environment variable does not include the directory where `pip` installs scripts.
fix
Ensure `johnnydep` is installed by running `pip install johnnydep`. If it's installed but still not found, confirm your `pip` script directory is in your PATH. On some systems, you might need to run `python -m johnnydep` instead of just `johnnydep`.
TypeError: 'str' object is not callable
This error can occur in programmatic usage if your code expects `JohnnyDist.console_scripts` (or similar entry point attributes) to be a string that can be called or split, but it is now a list.
fix
Update your code to treat `JohnnyDist.console_scripts` as a list of strings, as its behavior changed in version 1.20.0. Iterate over the list or use `','.join(my_dist.console_scripts)` if you need a string representation.
packaging.version.InvalidVersion: Invalid version: '22.0.post0' (or similar errors during metadata parsing)
This specific error, or similar metadata parsing issues, can occur if an incompatible `packaging` library version is installed, particularly `packaging==22.0`, which was blacklisted by `johnnydep==1.20.1` due to a bug.
fix
Upgrade your `packaging` library: `pip install --upgrade packaging`. If the issue persists, ensure `johnnydep` itself is up-to-date: `pip install --upgrade johnnydep`.
Upgrade
Version history
2.1.0latest on PyPI · released May 21, 2026
Audit
Dependencies
structlogrequiredStructured logging.
richrequiredRich terminal output for tree visualization and tables.
packagingrequiredCore library for Python package version and dependency specification handling. Requires >=20.0.
tomlrequiredUsed for parsing TOML configuration files.
unearthrequiredUsed for locating and downloading Python packages. Requires >=0.6.0.
PyYAMLrequiredYAML parser. Requires >=6.0.1.
Agent activity
8 hits · last 30 days
node
8
Resources
johnnydep — pip install johnnydep · libregistry