uv
uv copied to clipboard
Imports don't resolve correctly when using `uv pip install -e`
How to reproduce
Say you have the following file structure:
├── random_package
│ ├── random_package
│ │ └── __init__.py
│ └── setup.py
uv venv
uv pip install -e random_package
python -c "import random_package; print(random_package.__path__)" # ❌ prints a namespace path to ./random_package
mkdir some_other_dir
cd some_other_dir
python -c "import random_package; print(random_package.__path__)" # ✅ prints correct path to ./random_package/random_package
I created a repo with the files to reproduce here: https://github.com/philipp-eisen/uv-editable-install-issue