-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Description
When installing a module via pip install -e .
, it will generate a {module_name}.egg-info
folder in the same folder.
This causes issue when you later want to uninstall the said module via pip uninstall module_name
, because it will prioritize the .egg-info in the current folder instead of the one in global.
It will also has similar issues when trying to re-rum pip install -e .
(something about "unable to uninstall ..").
One has to manually delete that {module_name}.egg-info
folder, or use a different working directory, to be able to uninstall the installed module properly.
Below is a log to show that.
Expected behavior
Expected: pip_bug can be uninstalled globally
Observed: pip_bug cannot be uninstalled in CWD unless manually removing the egg-info folder.
pip version
25.1.1
Python version
3.13
OS
Windows 10
How to Reproduce
- Clone https://github.com/fireattack/pip_bug and cd into it.
pip install -e .
pip uninstall pip_bug
Output
(py313) D:\temp\!bugs\pip_bug>pip install -e .
Obtaining file:///D:/temp/%21bugs/pip_bug
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: pip_bug
Building editable for pip_bug (pyproject.toml) ... done
Created wheel for pip_bug: filename=pip_bug-0.1.0-0.editable-py3-none-any.whl size=4356 sha256=a0c24a23ce7a49052a8f62cb6f9a270bb2444133b0994d853e8563b2a167ad06
Stored in directory: C:\Users\ikena\AppData\Local\Temp\pip-ephem-wheel-cache-b6k23gkq\wheels\9a\ad\9b\67d33404ac56ce92b46c9ea550bb2bca23750c1e241146bf37
Successfully built pip_bug
Installing collected packages: pip_bug
Successfully installed pip_bug-0.1.0
(py313) D:\temp\!bugs\pip_bug>pip uninstall pip_bug
Found existing installation: pip_bug 0.1.0
Can't uninstall 'pip_bug'. No files were found to uninstall.
(py313) D:\temp\!bugs\pip_bug>rmdir pip_bug.egg-info /s /q
(py313) D:\temp\!bugs\pip_bug>pip uninstall pip_bug
Found existing installation: pip_bug 0.1.0
Uninstalling pip_bug-0.1.0:
Would remove:
c:\users\ikena\anaconda3\envs\py313\lib\site-packages\__editable__.pip_bug-0.1.0.pth
c:\users\ikena\anaconda3\envs\py313\lib\site-packages\__editable___pip_bug_0_1_0_finder.py
c:\users\ikena\anaconda3\envs\py313\lib\site-packages\pip_bug-0.1.0.dist-info\*
Proceed (Y/n)? y
Successfully uninstalled pip_bug-0.1.0
Code of Conduct
- I agree to follow the PSF Code of Conduct.