Repository navigation
Error: Version X with arch x64 not found #162
Description
Describe the bug
I am attempting to use setup-python with a self-hosted runner running on an ec2 instance. I am using this ami ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20201112. I have followed the instructions here. I am getting the following output when the setup-python action is run:
Run actions/setup-python@v2
with:
python-version: 3.7.7
token: ***
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
Version 3.7.7 was not found in the local cache
Version 3.7.7 is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/3.7.7-20200609.4/python-3.7.7-linux-18.04-x64.tar.gz"
Extract downloaded archive
/bin/tar xz --warning=no-unknown-keyword -C /actions-runner/_work/_temp/f7f341f3-b2b9-4eff-bff0-5b55acb3a0f1 -f /actions-runner/_work/_temp/402c2129-71c1-46e4-9263-3b04a4b9772a
Execute installation script
Check if Python hostedtoolcache folder exist...
Create Python 3.7.7 folder
Copy Python binaries to hostedtoolcache folder
Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
Upgrading PIP...
Looking in links: /tmp/tmpryj40n3d
Requirement already satisfied: setuptools in /opt/hostedtoolcache/Python/3.7.7/x64/lib/python3.7/site-packages (41.2.0)
Requirement already satisfied: pip in /opt/hostedtoolcache/Python/3.7.7/x64/lib/python3.7/site-packages (19.2.3)
Collecting pip
Using cached https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d396a433/pip-20.2.4-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-20.2.4
Create complete file
Error: Version 3.7.7 with arch x64 not found
The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
It's unclear what is actually failing as it seems to be finding the 3.7.7 python version and installs it and then it fails after installing pip.
Which version of the action are you using?
-
v1 -
v2 - Some other tag (such as
v2.0.1ormaster)
Environment
- self-hosted
- Linux
- Windows
- Mac
If applicable, please specify if you're using a container
Python Versions
Please list all of the effected versions of Python (3.8.2, etc.)
Tried 3.7.7, 3.10.0-alpha.2
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Run/Repo Url
If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.
NA
Additional context
Here's the script that launches the runner:
#!/bin/bash -xe
apt-get update -y
apt-get upgrade -y
${local.apt-get-all-packages}
sudo usermod -a -G docker ubuntu
sudo systemctl start docker
sudo systemctl enable docker
export RUNNER_ALLOW_RUNASROOT=true
export AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
mkdir actions-runner
mkdir /opt/hostedtoolcache
cd actions-runner
curl -O -L https://github.com/actions/runner/releases/download/v${var.runner-version}/actions-runner-linux-x64-${var.runner-version}.tar.gz
tar xzf ./actions-runner-linux-x64-${var.runner-version}.tar.gz
./config.sh --url https://github.com/${var.owner}/${var.repository} --token ${var.github-registration-token} --name "actions-runner-$(hostname)" --unattended
sudo ./svc.sh install
sudo ./svc.sh start

Activity
jolo-dev commentedon Nov 22, 2020
For me the same.
I use https://github.com/nektos/act for testing Github actions locally.
I got
and even tried the one from the README
kldavis4 commentedon Dec 2, 2020
Found these related issues: #89 and #92
kldavis4 commentedon Dec 2, 2020
The root of this issue seems to be that the tool-cache library function for fetching the cache directory (https://github.com/actions/toolkit/blob/master/packages/tool-cache/src/tool-cache.ts#L693) is using
RUNNER_TOOL_CACHEbut this is set to/actions-runner/_work/_toolinstead of/opt/hostedtoolcache. SettingRUNNER_TOOL_CACHE(within the self-hosted runner or the actions yml) seems to have no effect and I haven't been able to determine yet how the default is getting set.kldavis4 commentedon Dec 3, 2020
I was able to figure out a workaround that seems ok. Not fully tested yet for possible side effects.
If I modify the setup script to create a symlink from
/opt/hostedtoolcacheto the directory it expects forRUNNER_TOOL_CACHE, everything installs correctly. So my modified script is now:meiswjn commentedon Dec 21, 2020
Unrelated to the problem of the author, but I initially thought I had the same problem:
I used debian instead of ubuntu, thus it did not work.
Mabye helpful for other stumbling over this
higebu commentedon Dec 23, 2020
@meiswjn You can use Debian with creating
/etc/lsb-releaselike Ubuntu. If you use Debian 10,/etc/lsb-releaseshould be same as Ubuntu 18.04 like this.Segfaultd commentedon Feb 11, 2021
Any chance this issue get attention?
Segfaultd commentedon Mar 30, 2021
Still not dead, and still wanting this issue to get attention. Someone alive?
thetaiter commentedon Apr 16, 2021
poke
IdoPort commentedon Apr 19, 2021
another poke in the wall...
tianqiliu-RBLX commentedon Apr 26, 2021
+1, following on this
cep21 commentedon May 3, 2021
@kldavis4 How did your workaround end up long term? Still working well?
janjur commentedon May 22, 2021
...PPoke
epwalsh commentedon Jun 12, 2021
+1
90 remaining items
fan9704 commentedon Jan 23, 2023
Got it thanks your reply
LucaMarconato commentedon Jan 23, 2023
@abarragan-adtriba ok I understand. So this seems like a limitation of
act, I will report there. Withactone is supposed to be able to obtain a docker image of the same OS that is used in Github for running the actions. From your message I understand that the Apple Silicon chips can't be used to run those os images.0x78f1935 commentedon Feb 14, 2023
Our Github actions runner is hosted in a containerized docker container.
I had the same issues when using the option
Changing this too
did the trick for me.
abarragan-adtriba commentedon Feb 14, 2023
@0x78f1935
ubuntu-latestis a bad practice as you could have read on the thread, this was the reason people (myself included) got into this problem because that's a dynamic tag.0x78f1935 commentedon Feb 14, 2023
Didn't see someone mentioning it was bad practice. Perhaps I read past it, but at the end of the day I can see why. Thanks for mentioning this!
In addition the comment made by abarragan-adtriba was very helpful.
In my case, wanting Python 3.11.1, I should use
ubuntu-22.04instead.Again, thanks for pointing this out!
Alotab commentedon Feb 17, 2023
This was the missing piece. It's working now.
ci: update setup-python action version
Release 22.11 (#48)
github-action/macos build fix
github-action/macos build fix
github-action/macos build fix
PhoenixxZ2023 commentedon Jul 7, 2024
Run pytest
pytest
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.11.9/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
============================= test session starts ==============================
platform linux -- Python 3.11.9, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/runner/work/PLUS/PLUS
collected 0 items
============================ no tests ran in 0.02s =============================
Error: Process completed with exit code 5.
hiperioncn commentedon Jan 13, 2025
change to
"ubuntu-latest" is not a good configuration method because this version is variable. When a new version comes out, it may cause other incompatibility issues.
ci: run Python 3.7 with Ubuntu 22.04
ci: run Python 3.7 with Ubuntu 22.04