Conversation
|
Backstory: I've made the mistake of running |
|
I don’t think this fixes #7450, but only eliminates the subsequent failure caused by the mess it creates. To properly fix the issue, pip needs to fail on installation instead. |
You're right, thanks for the flag. The symptom is the same but the cause is different. #7450 relates to temp directories generated from |
|
FYI I've submitted a PR to CPython to fix the root cause (shutil.move() failing incorrectly): python/cpython#24001 |
|
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
|
Closing since this has been merged via #9669. |
This PR addresses issues that arise when packages in
site-packagesare not owned by the same user runningpip.Reproduce:
Changes:
site-packagesevery time this command is run. This change adds aUninstallationErrorthat is raised before the temporary folder is created, through aPermissionErrorexception at theutils::misc::renameslevel.rootfrom a previoussudo pip install. This change warns the user and offers potential solutions.site-packages,pip freezewarns with a parsing error. This change makes pip ignore temp directories when runningpip freeze.Issues addressed:
pip install -e#7940~-prefixed temp directories inpip freezewill be addressed when the warning is removed. pip3 freeze output still confusing when stray AdjacentTempDirectorys are present #7269 pip list and pip freeze treat invalid packages differently #9235Fixes #7269
Fixes #9235