Skip to content

libmamba fails when using tox-conda, because python =3.0x  #277

@zacharyburnett

Description

@zacharyburnett

when using conda: true with conda_deps and conda_channel set in the tox.ini, I get the following error:
https://github.com/spacetelescope/wfc3tools/actions/runs/15071133917/job/42367498006#step:6:53

  error    libmamba Could not solve for environment specs
      The following package could not be installed
      └─ python =3.0x * does not exist (perhaps a typo or a missing channel).
  critical libmamba Could not solve for environment specs

here is the YAML:

  test:
    uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
    with:
      conda: true
      envs: |
        - linux: py311-xdist
        - linux: py312-xdist
        - macos: py312-xdist
        - linux: py3-cov-xdist
          coverage: codecov

From #123, setup-micromamba is using ${{ matrix.python_version }}:

python=${{ matrix.python_version }}

However, I can't find where python_version is being set as 3.0x:

# set python_version
python_version = env.get("python-version")
m = re.search("^py(2|3)([0-9]+)", item["toxenv"])
if python_version is not None:
item["python_version"] = python_version
elif m is not None:
major, minor = m.groups()
item["python_version"] = f"{major}.{minor}"
else:
item["python_version"] = env.get("default_python") or default_python

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions