# Python Import Path Debugging

> Diagnose ModuleNotFoundError when a package is installed but still fails to import

- Skill: `vamseeachanta/python-import-path-debugging` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/python-import-path-debugging`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/python-import-path-debugging/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/python-import-path-debugging

---


# Python Import Path Debugging

When a ModuleNotFoundError occurs despite the package being installed, the issue is typically a Python path/environment mismatch. Check: (1) which Python executable the CLI script uses (check shebang and `which`), (2) which environment has the package installed vs. which the script is executing in, (3) whether the script is using a virtual environment that differs from your active shell environment. Verify with `python -c "import module; print(module.__file__)"` to confirm the correct interpreter is being used.
