uv icon indicating copy to clipboard operation
uv copied to clipboard

Imports don't resolve correctly when using `uv pip install -e`

Open philipp-eisen opened this issue 1 year ago • 4 comments

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

Screenshot

I created a repo with the files to reproduce here: https://github.com/philipp-eisen/uv-editable-install-issue

philipp-eisen avatar Feb 19 '24 16:02 philipp-eisen