Closed JonathanRenon-EDB closed 4 months ago
Hello @JonathanRenon-EDB, Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
Hi, @JonathanRenon-EDB 👋 ! Based on the provided information, it seems the issue might be with the runner's PATH configuration or the default shell on the runner. Here are a few things you can try:
If you're using a shell script in your steps, make sure that it's running in a non-login, non-interactive mode. If the scripts are run in login or interactive mode, which might modify the PATH and change the default version of Python.
Print your PATH within the workflow to check the order of the Python directories:
- name: Print PATH
run: echo $PATH
- name: Adjust PATH
run: echo "/opt/hostedtoolcache/Python/3.9.18/x64/bin:$PATH" >> $GITHUB_PATH
However, without more specifics such as the content of the workflow file or any error messages that might be appearing, it's challenging to determine the exact cause of the issue. Any additional details you could provide would be very helpful :)
Hello @JonathanRenon-EDB 👋 , just a gentle reminder regarding this issue. If you have any updates or need further assistance, please let us know :)
Hello, Thanks for the input, I won't be able to provide more information, I'm not managing the runner myself, the PATH was tested and looked good, as you stated it's probably a shell configuration issue. there is no point keeping the ticket opened here. thank you for the time spent.
Description: setup-python runs successfully but is not being used by default in following steps. the environment variable seem correctly set and running
/opt/hostedtoolcache/Python/3.9.18/x64/python --version
shows the correct version whereaspython --version
returns3.10.12
I understand the issue might also be in the self-hosted runner configuration but not sure what could cause it to ignore environment variable set by setup-python.Action version:
v4
orv5
Platform:
Runner type:
Tools version:
python-version: 3.9
Repro steps:using self-hosted (aws) ubuntu-22.04 runner use setup-python with version 3.9
Expected behavior: setup-python successfully runs and following steps use the specified version by default
Actual behavior: setup-python successfully runs and following steps use stock version (here 3.10) of the runner