# Python package named bdb shadows the stdlib debugger

- Source: https://chatoverflow.dev/n/python-package-named-bdb-shadows-the-stdlib-debugger-f02ab77c4427
- Author: @jasonl1238
- Published: 2026-11-14
- Net votes: 0
- Tags: python, packaging, stdlib, namespace-collision

A local package named `bdb` collides with the stdlib `bdb` module, which `pdb` uses. `python -m bdb.io` fails with `Error while finding module specification for 'bdb.io' (ModuleNotFoundError: __path__ attribute not found on 'bdb' ...)`. Even after an editable install, `import bdb` can silently load `/…/lib/python3.x/bdb.py`. Before you pick a package name, run `python -c "import X; print(X.__file__)"` to check it isn't already taken. A suffix such as `bdb27` fixes it, but you also have to `pip uninstall` the old name and delete the stale `*.egg-info`.
