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

Python 3.7 does not appear to be supported anymore #158

Closed
sam-hoffman opened this issue Mar 29, 2021 · 6 comments
Closed

Python 3.7 does not appear to be supported anymore #158

sam-hoffman opened this issue Mar 29, 2021 · 6 comments

Comments

@sam-hoffman
Copy link

Hi! My env file looks like this:

name: my-env
channels:
  - conda-forge
  - defaults
dependencies:
  - python<3.8
  - networkit==6.1.0
...

However, the setup-miniconda logs report that Python 3.8.5 is being added to the env file, which then predictably fails

2021-03-29T16:03:37.0343949Z Making patched copy of 'environment-file: my-service/env.yml'
2021-03-29T16:03:37.0344996Z name: my-env
2021-03-29T16:03:37.0345729Z channels:
2021-03-29T16:03:37.0346613Z   - defaults
2021-03-29T16:03:37.0347511Z   - conda-forge
2021-03-29T16:03:37.0348311Z dependencies:
2021-03-29T16:03:37.0349231Z   - python<3.8
2021-03-29T16:03:37.0350128Z   - networkit==6.1.0
...
2021-03-29T16:03:37.0370060Z   - python=3.8.5
2021-03-29T16:03:37.0370462Z 
2021-03-29T16:03:37.0371612Z ##[group]Updating 'my-env' env from conda env update...
2021-03-29T16:03:37.0373261Z [command]/usr/share/miniconda/condabin/conda env update --name my-env --file /tmp/environment-patched.yml
2021-03-29T16:04:09.3426732Z Collecting package metadata (repodata.json): ...working... done
2021-03-29T16:04:09.3822645Z Solving environment: ...working... failed
2021-03-29T16:04:09.3833700Z ##[warning]
ResolvePackageNotFound: 
  - python[version='3.8.5.*,<3.8']

Is this related to the new update? It has not failed in the past. I tried pinning [email protected] but had the same error result. Ideally, I'd like to be able to specify the Python version in my env.yml file.

@jaimergp
Copy link
Member

Can you try leaving your env file unrestrained when it comes to python and specify python-version: 3.7?

name: my-env
channels:
  - conda-forge
  - defaults
dependencies:
  - python
  - networkit==6.1.0
  ....

@sam-hoffman
Copy link
Author

Unfortunately for some of our codebases we need to specify the Python version in the env.yml file.

Would you accept a PR to allow the Python version specified in the env.yml file to override the Python version defaulted to in the github action?

@jaimergp
Copy link
Member

I see. I guess that'd be ok but before you put any work I'll have @bollwyvl and @goanpeca confirm!

@bollwyvl
Copy link
Contributor

what does your action invocation look like?

@bollwyvl
Copy link
Contributor

Lacking more precise information...

v2.1 tries to reduce the number of successive re-solves of the environment, for performance reasons.

If you specify use: python-version:, it will always override whatever it finds in environment.yml, as it now actually creates a patched version of the file and conda env updates that in one shot.

Note that #160 (which did provide enough information to debug the issue) points out that we're messing up the channel ordering, because javascript, but we'll get that sorted this evening.

In the near term (e.g. next 24 hours), try removing python-version, and provided you are not bit by the channel ordering bug, you should see the expected behavior.

@sam-hoffman
Copy link
Author

Thank you @bollwyvl ! You are correct, removing python-version from the actions specification fixed the problem. This issue can be closed :) Thank you so much for all your hard work, all of you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants