fix: avoid pip install panda-client permissions denied error#1
Merged
fix: avoid pip install panda-client permissions denied error#1
pip install panda-client permissions denied error#1Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Actions CI workflow to install panda-client in user-space to prevent permission issues when pip attempts to write to system directories during pipeline runs.
Changes:
- Add
--userto thepip install panda-clientstep in CI.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace 'pip install --user panda-client' with a git clone from PanDAWMS/panda-client and installation via 'python3 setup.py install --prefix=$HOME/.local', as recommended by upstream. This avoids the permission denied error caused by the custom install_data logic attempting to write to /usr/etc. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
setup.py install --prefix=$HOME/.local places modules under $HOME/.local/lib/pythonX.Y/site-packages/, which is not automatically on sys.path in GitHub Actions. Export PYTHONPATH and PATH via GITHUB_ENV/GITHUB_PATH so subsequent steps can import pandaclient and find installed scripts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On Debian/Ubuntu, distutils with --prefix appends an extra 'local/' segment, so --prefix=$HOME/.local lands in $HOME/.local/local/lib/... rather than $HOME/.local/lib/.... Use a clean prefix (/tmp/panda-install) and discover the real site-packages directory via find, making PYTHONPATH correct regardless of Python version or OS path conventions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pip install panda-client permissions denied error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.
This adds
--userto pip install to avoid attempts to write to/usr/etc.What is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply