Skip to content

Commit 824d56f

Browse files
committed
chore: clearer messaging if dep missing
1 parent 7525f08 commit 824d56f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/src/cli_commands.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
# Hard fail – rich is required for the CLI
1919
print("ERROR: python-rich is not available in this Python environment.", file=sys.stderr)
2020
print(f"ImportError: {e}", file=sys.stderr)
21+
print(f"\nPython being used: {sys.executable}", file=sys.stderr)
22+
print(f"Python version: {sys.version.split()[0]}", file=sys.stderr)
23+
print("\nThis usually means python-rich is installed for a different Python version.", file=sys.stderr)
24+
print("The CLI requires system Python with distro packages installed.", file=sys.stderr)
2125
print("\nTry installing it using your package manager:", file=sys.stderr)
2226
print(" Arch: pacman -S python-rich", file=sys.stderr)
2327
print(" Debian/Ubuntu: apt install python3-rich", file=sys.stderr)
2428
print(" Fedora: dnf install python3-rich", file=sys.stderr)
2529
print(" Or via pip: pip install rich>=13.0.0", file=sys.stderr)
30+
print("\nIf using a Python version manager (pyenv, mise, asdf), ensure", file=sys.stderr)
31+
print("python-rich is installed for your system Python (/usr/bin/python3).", file=sys.stderr)
2632
sys.exit(1)
2733

2834
try:

0 commit comments

Comments
 (0)