Skip to content
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

Show hint when permission denied encountered during system package install #11599

Open
zanieb opened this issue Feb 18, 2025 · 0 comments
Open
Labels
error messages Messaging when something goes wrong

Comments

@zanieb
Copy link
Member

zanieb commented Feb 18, 2025

~: uv pip install --system Pillow
Using Python 3.12.8 environment at: /usr
Resolved 1 package in 103ms
error: Failed to install: pillow-11.1.0-cp312-cp312-manylinux_2_28_x86_64.whl (pillow==11.1.0)
  Caused by: failed to create directory `/usr/local/lib64/python3.12/site-packages/`: Permission denied (os error 13)

We should hint what to do here, e.g.,

hint: It looks like you do not have permissions to write to the system Python environment. Consider creating a virtual environment (uv venv) then installing the package or installing it in an isolated tool environment (uv tool install).

We could probably be smart, like only hint a tool install if the package has entry points.

@zanieb zanieb added the error messages Messaging when something goes wrong label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong
Projects
None yet
Development

No branches or pull requests

1 participant