-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not install editable pip into venv on Windows #12666
Comments
My workaround is to use
|
This might be a duplicate of #11349, but I find this 100% reproducible, it seems like it might be an edge case with pip specifically, and if not for uv I would struggle to test pip on Windows. |
I can confirm this. I note the lines
in the "rolling back" section of the output. I wonder if the problem here is that pip renames itself to I don't know how we'd fix this, to be honest. It seems pretty fundamental that moving the package that you're using while it's running would make it impossible for it to find its own resources. The best I can think of is for distlib to load all of its wrapper executables into memory at import time - or for us to patch distlib to do that, as our use case is almost unique, and I wouldn't be surprised if distlib wasn't willing to do this. I'll see if I can work up a patch for this. |
Adding a note here so I don't forget later. The reproducer is tricky. The version of pip that's being tested is the one that was installed in non-editable mode as part of creating the venv. So when I patch pip, in order to test, I need to:
Writing a test for this is going to be fun! I suspect I'll be fighting our test infrastructure all the way 🙁 |
OK. I have a test that demonstrates the issue all the way back to Python 3.8. I also have a fix, but it relies on the I think I know how to fix 3.8, but that will have to wait for tomorrow. |
Description
It is not possible to install an editable version of pip into a virtual environment on Windows using Python 3.12 and pip 24.0, I have tried this multiple ways on multiple machines now
Expected behavior
It is possible to install an editable version of pip
pip version
24.0
Python version
3.12.3
OS
Windows 10
How to Reproduce
cd C:\temp
(or similiar)git clone https://github.com/pypa/pip
cd pip
py -3.12 -m venv .venv
.\.venv\Scripts\activate
python -m pip install -e .
Output
The text was updated successfully, but these errors were encountered: