-
Notifications
You must be signed in to change notification settings - Fork 565
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
Error: Version X with arch x64 not found #162
Comments
For me the same. I got [Deploy Powerlevel10k Docs/Python 3.x sample-2] ❗ ::error::Version 3.x with arch x64 not found%0AThe list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
[Deploy Powerlevel10k Docs/Python 3.x sample-2] ❌ Failure - Setup python
Error: exit with `FAILURE`: 1 and even tried the one from the README jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['2.x', '3.x']
name: Python ${{ matrix.python-version }} sample
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: python my_script.py |
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 |
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
|
Unrelated to the problem of the author, but I initially thought I had the same problem: Mabye helpful for other stumbling over this |
@meiswjn You can use Debian with creating
|
Any chance this issue get attention? |
Still not dead, and still wanting this issue to get attention. Someone alive? |
poke |
another poke in the wall... |
+1, following on this |
@kldavis4 How did your workaround end up long term? Still working well? |
...PPoke |
+1 |
+1 |
1 similar comment
+1 |
@kldavis4 I tried your workaround on amazon linux 2 but still no luck. action # pre-commit setup
- uses: actions/setup-python@v2
with:
python-version: 3.9.5
env:
AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
RUNNER_TOOL_CACHE: /opt/hostedtoolcache userdata export USER=root
export RUNNER_ALLOW_RUNASROOT=true
export RUNNER_TOOL_CACHE=/opt/hostedtoolcache
export AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
mkdir -p $AGENT_TOOLSDIRECTORY
mkdir -p /actions-runner/_work
ln -s $AGENT_TOOLSDIRECTORY /actions-runner/_work/_tool
curl -s https://raw.githubusercontent.com/actions/runner/v2.278.0/scripts/create-latest-svc.sh | bash -s myorg check # ls -la /actions-runner/_work/
total 0
drwxr-xr-x 2 root root 19 Jun 21 20:45 .
drwxr-xr-x 3 root root 19 Jun 21 20:45 ..
lrwxrwxrwx 1 root root 20 Jun 21 20:45 _tool -> /opt/hostedtoolcache In the action, I see
If I look in the manifest, I see it {
"filename": "python-3.9.5-linux-16.04-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "16.04",
"download_url": "https://github.com/actions/python-versions/releases/download/3.9.5-109482/python-3.9.5-linux-16.04-x64.tar.gz"
}, It looks like setup-python/src/find-python.ts Line 10 in dc73133
We're using the default or some non pypy one so it's hitting setup-python/src/find-python.ts Lines 194 to 201 in dc73133
which calls setup-python/src/find-python.ts Lines 86 to 115 in dc73133
|
@nitrocode couple things to check out...
|
@kldavis4 I'm using Amazon Linux 2 AMI. That's probably the issue. The |
I've been down the rabbit hole and I can't find an elegant solution. It looks like the best bet is to add support here: https://github.com/actions/python-versions/ and then have those new files added to the manifest? Either way, this is blocking us, and I think its a pretty common situation given the prowess of AWS. |
@nitrocode @kldavis4 Do either of you have a solution for Amazon Linux 2 yet? |
On my AWS Linux 2 runner i settled with just installing python myself in a setup script, does work well enough. |
Just for reference, I'm seeing this issues on self-hosted macOS as well. |
@bumbummen99 could you share that ? I'd be interested in using that in the interim if it's easy enough to choose a specific python version to install. Edit: This is our workaround # pre-commit setup
# This has issues running on self-hosted. See https://github.com/actions/setup-python/issues/162.
# - uses: actions/setup-python@v2
# The self-hosted runner has python 2.7.18 and 3.7.10 installed.
- name: Ensure pip is linked to pip3
if: false # disabled on eks self-hosted runners, enabled on asg self-hosted runners
shell: bash
run: |
# The priority resembles python version (3000) so that if we add an alternative for an
# older version of python with the same strategy, the newest version will win. Ideally,
# we'd wrap the remaining steps in pre/post inside a virtualenv, which is probably what
# the setup-python action does.
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 3000
# when pip is run as root (in later steps) it defaults to --prefix=/usr/local
echo "/usr/local/bin" >> $GITHUB_PATH
- uses: actions/setup-node@v2
with:
node-version: '14'
# end pre-commit setup (workaround) |
I went down the rabbit hole as well, and like @kldavis4 points out, I link the problem might be related to And the same workaround "solves" the issue on macOS. Although I haven't thoroughly tested, if it causes any issues down the road. rm -rf actions-runner/_work/_tool && ln -s /Users/runner/hostedtoolcache actions-runner/_work/_tool Defining |
In my case I was doing something stupid. Maybe this will help someone.
|
good catch ! |
Better isolation of environment compared to relying on setup python actions and activating various base environments on shell login. See github.com/actions/setup-python/issues/162
Same problem here since last week, I get
|
@fan9704 which platform and version are you using? |
@abarragan-adtriba true, I have changed it to "3.9.16" and the problem persists:
I checked the link above and I can't find any reference to EDIT: additional details. |
@LucaMarconato how is this a problem if there's no arch arm64 available at all? you are just querying for a non-existing arch, or maybe im missing smth. I mean it may be a problem on your setup but it's not related to this issue, but more on the looks of opening a request for adding versions for arm64 |
@abarragan-adtriba ubuntu-latest on GitHub Action |
@fan9704 , your issue is already explained in the thread, in particular: #162 (comment) |
Got it thanks your reply |
@abarragan-adtriba ok I understand. So this seems like a limitation of |
Our Github actions runner is hosted in a containerized docker container.
Changing this too
did the trick for me. |
@0x78f1935 |
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 |
This was the missing piece. It's working now. |
This patch is for testing locally with `act`. See actions/setup-python#162 .
* Add MaxiCodeMode class *Add :param mode: :type: MaxiCodeMode to MaxiCodeParams *Delete :param encode_mode: :type: int MaxiCodeParams * Try to temp fix build issue actions/setup-python#162
Github-action macos build started spitting: ``` Run actions/setup-python@v1 with: python-version: 3.x architecture: x64 env: changed_file_list: /var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/tmp.b0uhtmFUzp rebuild: 1 Error: Version 3.x with arch x64 not found Available versions: ``` Similar with actions/setup-python#162 Signed-off-by: MyungJoo Ham <[email protected]>
Github-action macos build started spitting: ``` Run actions/setup-python@v1 with: python-version: 3.x architecture: x64 env: changed_file_list: /var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/tmp.b0uhtmFUzp rebuild: 1 Error: Version 3.x with arch x64 not found Available versions: ``` Similar with actions/setup-python#162 Signed-off-by: MyungJoo Ham <[email protected]>
Github-action macos build started spitting: ``` Run actions/setup-python@v1 with: python-version: 3.x architecture: x64 env: changed_file_list: /var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/tmp.b0uhtmFUzp rebuild: 1 Error: Version 3.x with arch x64 not found Available versions: ``` Similar with actions/setup-python#162 Signed-off-by: MyungJoo Ham <[email protected]>
Run pytest ============================ no tests ran in 0.02s ============================= |
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: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
v2.0.1
ormaster
)Environment
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:
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
Screenshots
Additional context
Here's the script that launches the runner:
The text was updated successfully, but these errors were encountered: