Troubleshoot ModuleNotFoundError in CLI tools by identifying shebang-venv mismatches
Scanned 9/9/2026
Install to Claude Code
npx -y skills add vamseeachanta/workspace-hub --skill diagnose-shebang-venv-import-errors --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Diagnose Shebang Venv Import Errors?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-diagnose-shebang-venv-import-errors-workspace-hub)More formats (shields.io, HTML) on the badges page.
---
name: diagnose-shebang-venv-import-errors
description: Troubleshoot ModuleNotFoundError in CLI tools by identifying shebang-venv mismatches
version: 1.0.0
source: auto-extracted
extracted: 2026-04-10
metadata:
tags: ["python", "venv", "debugging", "cli-tools"]
---
# Diagnose Shebang vs Virtual Environment Import Errors
When a CLI tool fails with ModuleNotFoundError despite the package being installed, check if the shebang in `/usr/local/bin/` or `~/.local/bin/` points to system Python instead of the venv Python. Verify the actual Python interpreter being used by examining the shebang (`#!/usr/bin/env python3` vs `/path/to/venv/bin/python3`). If mismatched, update the shebang to explicitly point to the venv's Python executable. Be aware that auto-update mechanisms may revert custom shebangs—check for post-install scripts that regenerate entry points.Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.
一个全面的 Claude Code 会话验证系统。
Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.
Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.