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
pipx: command not found in v3 action #68
Comments
@NargiT Any thoughts? |
Hi @tiagovrtr I tried to reproduce your problem and could not: I noticed that your logs don't show any output from the |
Thanks for the quick response. I've realised I might have obfuscated the cause of the issue here. I noticed I had a step using google-github-actions/setup-gcloud. If I remove it the issue disappears. name: Upload Python Package
on:
pull_request:
@@ -32,8 +24,6 @@ jobs:
contents: "read"
id-token: "write"
pull-requests: "write"
env:
POETRY_VERSION: 1.5.0
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{vars.GCP_WORKLOAD_IDENTITY_PROVIDER}}
service_account: ${{vars.GCP_SERVICE_ACCOUNT}}
token_format: "access_token"
access_token_lifetime: "300s"
create_credentials_file: false
- name: "Set up Cloud SDK"
uses: google-github-actions/setup-gcloud@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
cache-dependency-path: "poetry.lock"
- name: Setup poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: ${{ env.POETRY_VERSION }} |
I believe that would be an implication on the |
Yes, absolutely, this is probably caused by gcloud's python. Closing the issue |
This might actually have issues unrelated to gcloud, as I get the same error in a clean sef-hosted runner. Also I've noticed the action follows installation steps for macOS, but setting up pipx should depend on the runner OS. In my case it should follow linux steps as the job
The command that seems to fail is |
Hello @abatilo, I just saw your message and @tiagovrtr doc seems correct. depending of the OS the installation steps are not the same. Should we add os detection and install pipx accordingly ? |
Please do @NargiT. Do you have the bandwidth to work on this? |
sorry not currently. |
Also experiencing this on Ubuntu 18.04. My logs indicate that
Relevant line being |
I was setting up a test repo to try out v3 to see how the switch to pipx would affect us. I was surprised of the installation attempt of pipx. It only takes a second, but perhaps it's good to add a check to see if pipx is on the path before calling pip install pipx? On github hosted runners pipx is already in the path:
(Output from my test repo here: https://github.com/anderssonjohan/pipx-python-version-github-actions/actions/runs/8434367775/job/23097437766) pipx v1.4.3 is already included in the runner-images, so I'm not sure why this action has to do it. I've not tested the v3 on older self-hosted linux+windows runners though, and I guess that's different, as mentioned in the comments here. |
v3 action fails because pipx is not on PATH
The text was updated successfully, but these errors were encountered: