-
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
Fix package permissions #9393
Fix package permissions #9393
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-packages
are not owned by the same user runningpip
.Reproduce:
Changes:
site-packages
every time this command is run. This change adds aUninstallationError
that is raised before the temporary folder is created, through aPermissionError
exception at theutils::misc::renames
level.root
from a previoussudo pip install
. This change warns the user and offers potential solutions.site-packages
,pip freeze
warns with a parsing error. This change makes pip ignore temp directories when runningpip freeze
.Issues addressed:
pip install -e
#7940~
-prefixed temp directories inpip freeze
will 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