[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

bash
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:

  1. Vendor a non-hidden .pth file (rename prefix from __editable__ to something without __).
  2. Switch to a *.dist-info editable shim compatible with site.py.
  3. Document pip install . (non-editable) as the recommended install method instead of pip install -e ..

Workaround

Use non-editable install:

bash
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