GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — setup-python does not setup the default python version as specified · Issue #425 · actions/setup-python

setup-python does not setup the default python version as specified #425

New issue
Copy link
New issue
Copy link
Closed
Closed
setup-python does not setup the default python version as specified#425
Copy link
Labels
bugSomething isn't workingneeds triage

Description

@shelper
shelper
opened on Jun 10, 2022
Issue body actions

Description:
i have the following setup in my ci.yml

env:
  PYTHON_VERSION: 3.8
  POETRY_VERSION: 1.2.0a2
...
Jobs:
  ci:
     steps:
      - name: Setup Python with poetry caching
        id: setup-python
        uses: actions/setup-python@v3
        with:
          python-version: ${{env.PYTHON_VERSION}}
          cache: 'poetry'
      - name: run poetry shell
         run: poetry shell

I saw that python 3.8 is successfully setted up.

Run actions/setup-python@v3
  with:
    python-version: 3.8
    cache: poetry
    token: ***
  env:
    PYTHON_VERSION: 3.8
    POETRY_VERSION: 1.2.0a2
Successfully setup CPython (3.8.10)
"C:\Program Files (x86)\pipx_bin\poetry.exe" config --list
cache-dir = "C:\\Users\\runneradmin\\AppData\\Local\\pypoetry\\Cache"
experimental.new-installer = true
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "***cache-dir***\\virtualenvs"  # C:\Users\runneradmin\AppData\Local\pypoetry\Cache\virtualenvs
poetry cache is not found

but why the next step of run poetry shell still says active python version of 3.7?

Run poetry shell
poetry shell
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '**_0_**'"
env:
PYTHON_VERSION: 3.8
POETRY_VERSION: 1.2.0a2
pythonLocation: C:\hostedtoolcache\windows\Python\3.8.10\x64
**The currently activated Python version 3.7.9 is not supported by the project (^3.8.0).**
Trying to find and use a compatible version.
Using python3 (3.8.10)
Creating virtualenv zetta-lstthbR--py3.8 in C:\Users\runneradmin\AppData\Local\pypoetry\Cache\virtualenvs
Spawning shell within C:\Users\runneradmin\AppData\Local\pypoetry\Cache\virtualenvs\zetta-lstthbR--py3.8
PowerShell 7.2.4
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.

Action version:
Specify the action version
tried both v3 and v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Activity

  1. shelper
    added
    bugSomething isn't working
    needs triage
    on Jun 10, 2022
  2. Kurt-von-Laven commented on Jun 10, 2022

    @Kurt-von-Laven
    Kurt-von-Laven
    on Jun 10, 2022
    Contributor
    More actions

    This seems like a duplicate of #374. I am not a maintainer of the setup-python action, but I suggest taking a look at #374 (comment) for a work around until the root cause is fixed.

  3. shelper commented on Jun 10, 2022

    @shelper
    shelper
    on Jun 10, 2022
    Author
    More actions

    thanks @Kurt-von-Laven but on windows i cannot use something like poetry env use 3.8... i have to write something to find the location of python on windows and pass the full path to poetry env use path. i will close this anyway, and post acomment in #374

    Reacted by Kurt von Laven
  4. shelper
    closed this as completedon Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.