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
Wrong python version installed #833
Comments
Hello @adrian-valente |
uses: actions/setup-node@v4.0.2 |
Hi @HarithaVattikuti , is there any update on this issue? I'm encountering an issue where I'm specifying an exact version of Python ( Build log: https://github.com/nyx-space/hifitime/actions/runs/8476347591/job/23225747105?pr=286 Thanks Edit: Here is another build log where the "Remove bad python" section shows that many versions of Python are installed but none are the ones I've asked for: https://github.com/nyx-space/hifitime/actions/runs/8476477745/job/23226053241?pr=286
And later:
|
Hello @adrian-valente 👋, |
Hello @adrian-valente 👋, |
Hello, in my latest workflow run from Tuesday, the problem persisted exactly as stated here. As mentioned it is not critical because one can easily appending |
Maybe I should give more details though, lest you stay stuck: The setup-python action apparently gives a correct result:
However, the next steps of the workflow involve adding conda to the path: - name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Conda info
run: conda info
- name: Conda list
run: conda list
- name: Install dependencies
run: |
python --version
conda install -y python=3.11
python --version Which immediately causes the python version to jump to 3.12. Keep in mind this is the worflow file as proposed directly by github, so one would expect it to work right away. I am not familiar enough with actions internals to understand how it is executed, but thought you might want to know about the issue. |
Description:
In a github action, a call to setup-python@v3 requiring python-version 3.11 actually installs 3.12, causing crashes downstream when conda is called.
Action version:
v3
Platform:
Runner type:
Tools version:
3.11
Repro steps:
Here is the workflow file:
Expected behavior:
The first call to python --version should return a 3.11 release, and hence the conda reinstall of python have no effect.
Actual behavior:
However we see on the first call that python 3.12 was installed, despite the requirement in the call to setup-python. Without the conda reinstall of python 3.11, this causes the subsequent conda install to crash with the error:
ImportError: cannot import name 'install' from 'conda.cli' (/usr/share/miniconda/lib/python3.12/site-packages/conda/cli/__init__.py)
. This issue suddenly surfaced less than a month ago, without other modifications to the workflow. It was mentioned on the conda repo in this issue.The text was updated successfully, but these errors were encountered: