Skip to content

self-hosted runner failing while trying to get version #96

Closed

Description

@tabossert

Describe the bug
Getting the following error when running
Version 3.x was not found in the local cache ##[error]Version 3.x with arch x64 not found The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json

I have tried both v1 and v2 of setup-python and have tried setting a specific version or latest minor like above. I am running an amazon-linux runner and I am wondering if this will only work on Ubuntu. Could you provide some guidance. Thanks

Which version of the action are you using?

  • v1
  • [ X ] v2
  • Some other tag (such as v2.0.1 or master)

Environment

  • [ X ] self-hosted
  • [ X ] Linux
  • Windows
  • Mac

If applicable, please specify if you're using a container
Not using containers

Python Versions
Please list all of the effected versions of Python (3.8.2, etc.)
3.7.7, 3.x

To Reproduce
Steps to reproduce the behavior:

  1. Add setup action step to actions file
  2. Set Actions file to use self-hosted runner
  3. Run action

Run/Repo Url
Private repo

Screenshots
Screen Shot 2020-05-23 at 9 49 06 AM

Additional context
The runner is using amazon-linux2 based ami

Activity

  1. tabossert commented on May 23, 2020

    @tabossert
    Author

    Seems it does work on Ubuntu with same config, might be good to add that this is Ubuntu only in readme for self-hosted

  2. etienne-napoleone commented on May 26, 2020

    @etienne-napoleone

    I also can't run those steps locally with act on mac

  3. konradpabjan commented on May 26, 2020

    @konradpabjan
    Contributor

    Officially we only support Python for the environments that are listed out here: https://github.com/actions/virtual-environments#available-environments

    We compile Python from source for Ubuntu 1604, 1804 and Mac (10.15), the available versions for download are listed out here: https://github.com/actions/python-versions/blob/master/versions-manifest.json

    If you have a local runner with something like Ubuntu 1904, then the platform_version will be different so nothing will be found in the manifest and the action will fail with the error you see. Same thing applies to Mac if you're using something other than 10.15.

    The fact is it's not working on an amazon-linux runner is expected and we do not plan on supporting Python for configurations other than what we have in virtual-environments.

    There are two things we can do here

    • Update the README (we accept PRs 😃 )
      • Mention we only support the same platforms as those listed in virtual-environments
      • Explain why we only support those platforms
        - Maintenance, maintenance, maintenance
        - For Ubuntu and Mac, we compile from source so it is impossible to support all Linux distros and we have no plans to support more.
        - For Windows we download and use the MSI installers so those should work on all versions
    • Even more logging and a better error message that says exactly why no version was found. It's very ambiguous right now.
  4. mariocesar commented on Jul 29, 2020

    @mariocesar

    Having the same issue with Ubuntu 18.04, I tried some other workarounds like setting the env RUNNER_TOOL_CACHE
    RUNNER_TEMP to writable directories, but no change it still fails to get the python version.

    Is for sure this is related to the Ubuntu version where the runner is ?

  5. ukstv commented on Oct 3, 2020

    @ukstv

    Hit this too. This seems like an issue in https://github.com/actions/toolkit. It reads version from /etc/lsb-release which seems to be deprecated in favour of /etc/os-release. That is, in most of the Linux distributions os-release is present, while lsb-release is not. The actions toolkit then can not figure version of the distro. Proposed fix in actions/toolkit#594

  6. melroyvandenberg commented on Nov 9, 2020

    @melroyvandenberg

    Help!?

  7. DavidGOrtega commented on Feb 15, 2021

    @DavidGOrtega

    👋 we hit this within an ubuntu 18.04 image, I mean a self hosted runner being executed within an ubuntu 18.04

    Version 3.8.4 was not found in the local cache
    Version 3.8.4 is available for downloading
    Download from "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/actions/python-versions/releases/download/3.8.4-96744/python-3.8.4-linux-18.04-x64.tar.gz"
    Extract downloaded archive
    /bin/tar xz --warning=no-unknown-keyword -C /__w/_temp/d4bf8825-2e51-48df-9471-1f742c18aa34 -f /__w/_temp/38e5f214-9cc7-44e5-b389-3dfaf10504b0
    Execute installation script
    Check if Python hostedtoolcache folder exist...
    Creating Python hostedtoolcache folder...
    Create Python 3.8.4 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/tmpj2_2nn33
    Requirement already satisfied: setuptools in /__t/Python/3.8.4/x64/lib/python3.8/site-packages (47.1.0)
    Requirement already satisfied: pip in /__t/Python/3.8.4/x64/lib/python3.8/site-packages (20.1.1)
    Collecting pip
    Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
    Installing collected packages: pip
    Successfully installed pip-21.0.1
    Create complete file
    Error: Version 3.8.4 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
    

    To give a bit of more context, its our own AMI based on Ubuntu 18.04

  8. DavidGOrtega commented on Feb 15, 2021

    @DavidGOrtega

    As you can see @konradpabjan we even find the proper version and we download it

    Download from "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/actions/python-versions/releases/download/3.8.4-96744/python-3.8.4-linux-18.04-x64.tar.gz"
    Extract downloaded archive
    

    But then the error is hit

  9. e-korolevskii commented on Jul 7, 2022

    @e-korolevskii
    Contributor

    Hello here!
    I apologize for the delay.
    Please let us know if this is still relevant for you, otherwise I'm going to close this issue.

  10. self-assigned this
    on Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions