-
Notifications
You must be signed in to change notification settings - Fork 552
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 doesn't respect actions/setup-python version #967
Comments
Here is an example repo to reproduce this: https://github.com/juftin/setup-python-example and the failing workflow: https://github.com/juftin/setup-python-example/actions/runs/11471145881/job/31921582259 |
I was able to confirm that the following resolved the issue - but I'm still not clear why the behavior changed ~ a week ago name: test
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
id: python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python Package
run: pipx install .
env:
PIPX_DEFAULT_PYTHON: ${{ steps.python.outputs.python-path }} |
Hi @juftin 👋, |
Same problem here. |
Hello @juftin 👋, - name: Setup Python
id: python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pipx
run: python -m pip install --user pipx
- name: Ensure pipx uses the correct Python
run: python -m pipx ensurepath
- name: Install Python Package
run: pipx install . This setup explicitly installs pipx, which then installs the desired Python package using the specified Python version. Please find the successful run here. |
@priya-kinthali Would it be possible for |
Hello @zariiii9003 👋, |
Hello @juftin 👋, |
Description:
I'm not sure if this is an issue with actions/setup-python,
pipx
, or the runners themselves - but the behavior for this changed for me between 2024-10-15 and 2024-10-16 (if you think this should be reported elsewhere please let me know)In the below workflow, the
setup-python-example
Python package requires Python >= 3.11Before 2024-10-16 the example package was installed using Python 3.12, but after it uses Python 3.10 and the workflow fails.
Action version:
v5
Platform:
Runner type:
Tools version:
3.12
Repro steps:
ubuntu-latest
runneractions/setup-python@v5
with version3.12
The action will fail because
pipx
is trying to use Python 3.10.Expected behavior:
I expect
pipx
to use whatever version is setup withactions/setup-python
Actual behavior:
I believe
pipx
is using the runner's default Python versionThe text was updated successfully, but these errors were encountered: