Skip to content
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

[BUG] env_specs not respected. #393

Open
mforbes opened this issue Mar 23, 2023 · 0 comments
Open

[BUG] env_specs not respected. #393

mforbes opened this issue Mar 23, 2023 · 0 comments
Labels
TRIAGE Uncategorized issue

Comments

@mforbes
Copy link

mforbes commented Mar 23, 2023

$ anaconda-project --version
0.11.1
$ conda --version
conda 23.1.0

Description of expected behavior and the observed behavior

The version dependencies specified in env_specs are not respected.

Relevant configuration files

# anaconda-project.yaml
name: issue
dependencies:
- numba
platforms:
- osx-arm64
env_specs:
  py3.10:
    packages:
    - python~=3.10.9
    channels: []
  py3.11:
    packages:
    - python~=3.11.0

When I try to prepare this environment, I get python 3.10, not python 3.11 as requested:

$ anaconda-project prepare --env-spec py3.11
...
  python             pkgs/main/osx-arm64::python-3.10.10-hc0d8a6c_2 
...

The issue is that numba currently does not support 3.11, so anaconda-project is doing a quasi-sensible thing and resolving this so I get a working environment, but it violates my dependency specification.

I expect behaviour similar to what happens when the dependencies are included in the same spec:

# anaconda-project.yaml
name: issue
dependencies:
- numba
- python~=3.11.0
platforms:
- osx-arm64
$ anaconda-project prepare
...
Package python conflicts for:
python~=3.11.0
numba -> python[version='>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']
...

Although inconvenient, this respects my request for python 3.11.

P.S. Why is the command-line option spelled --env-spec instead of --env_spec? Is this intentional? I expected it to match the section in the .yaml file.

@mforbes mforbes added the TRIAGE Uncategorized issue label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TRIAGE Uncategorized issue
Projects
None yet
Development

No branches or pull requests

1 participant