Skip to content
Back to skills

Diagnose Shebang Venv Mismatch

ASecurity

Identify and fix shebang mismatches when CLI tools resolve to system Python instead of their virtual environment

  • 17 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
code-qualitypythondebugging

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill diagnose-shebang-venv-mismatch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagnose Shebang Venv Mismatch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diagnose Shebang Venv Mismatch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-diagnose-shebang-venv-mismatch/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-diagnose-shebang-venv-mismatch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diagnose-shebang-venv-mismatch
description: Identify and fix shebang mismatches when CLI tools resolve to system Python instead of their virtual environment
version: 1.0.0
source: auto-extracted
extracted: 2026-04-10
metadata:
  tags: ["python", "venv", "debugging", "cli-tools", "shebang"]
---

# Diagnose Shebang vs Venv Mismatch

When a CLI tool fails with ModuleNotFoundError for packages that are installed in its venv, the entry point shebang may be pointing to system Python instead of the venv's Python. Check the shebang in `/usr/local/bin/<tool>` or `~/.local/bin/<tool>` — it should reference the venv's Python (`/path/to/venv/bin/python3`), not `/usr/bin/env python3`. Update the shebang directly or check if the tool's update process regenerates it with a generic shebang, requiring a permanent fix strategy.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.