[Bug] pip install -e . produces __editable__.pth that site.py silently skips
Author: ardjo-sCreated Aug 21, 2026Updated Aug 21, 2026
Bug: pip install -e . produces __editable__.pth that site.py silently skips
Describe the bug
pip install -e . (editable install) creates __editable__.prettymaps-1.4.2.pth in site-packages. Python's site.py treats files starting with __ as "hidden" and skips them entirely. Result: pip list shows prettymaps 1.4.2, but import prettymaps fails with ModuleNotFoundError.
To reproduce
git clone https://github.com/marceloprates/prettymaps.git
cd prettymaps
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
python -c "import prettymaps"
# → ModuleNotFoundError: No module named 'prettymaps'
pip list | grep prettymaps
# → prettymaps 1.4.2 ← appears installed!Expected behavior
import prettymaps should succeed after pip install -e ..
Root cause
PEP 660 editable installs generate __editable__.<name>.pth files. CPython's site.py addsitedir function filters out any file matching __* (the hidden-file convention). The package metadata is registered but the import path is never added to sys.path.
Suggested fix
Either:
- Vendor a non-hidden
.pthfile (rename prefix from__editable__to something without__). - Switch to a
*.dist-infoeditable shim compatible withsite.py. - Document
pip install .(non-editable) as the recommended install method instead ofpip install -e ..
Workaround
Use non-editable install:
pip install --no-deps /path/to/prettymaps # copies into site-packages, no .pth
# or from PyPI:
pip install "prettymaps==1.4.2"Environment
- prettymaps v1.4.2
- Python 3.10.18 and 3.14.6 (Homebrew)
- pip 25.1.1
- macOS 15, ARM64
Source: marceloprates/prettymaps