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

Env var for using specific Python version #3

Open
TheLastProject opened this issue Oct 12, 2018 · 11 comments
Open

Env var for using specific Python version #3

TheLastProject opened this issue Oct 12, 2018 · 11 comments

Comments

@TheLastProject
Copy link
Contributor

It'd be great to have something like CONDA_PYTHON_VERSION or so to be able to explicitly request for example 3.6 instead of 3.7. In my case, one of my dependencies doesn't build on 3.7 yet, and conda upgraded from 3.6 to 3.7, so now my build is broken with seemingly nothing I can do.

@TheAssassin
Copy link
Member

Good idea.

Right now, we're downloading some "miniconda v3 latest" script. Any idea how we could request a version explicitly?

@TheAssassin
Copy link
Member

Miniconda's version script differs from Python's. See https://repo.continuum.io/miniconda/.

@TheLastProject
Copy link
Contributor Author

You can use conda create -n envname anaconda python=3.6 and instead of using activate use activate envname. Would probably only be a very small change actually.

@TheLastProject
Copy link
Contributor Author

Actually, I think anaconda shouldn't be in that command. Documentation is a bit weird.

@TheAssassin
Copy link
Member

I see. I will test a bit.

Shall we recognize and support Python 2 as well?

@TheLastProject
Copy link
Contributor Author

Well, that'll make things slightly more complex I suppose, but it's a logical next step letting people use 2 for "latest python 2"

@TheAssassin
Copy link
Member

My idea was to download the Python 2 miniconda script if the version begins with 2, and if it's exactly 2 just use the latest, otherwise install a version explicitly.

@TheLastProject
Copy link
Contributor Author

Sounds good yeah

@TheAssassin
Copy link
Member

Let's first focus on the Python 3 aspects.

@TheAssassin
Copy link
Member

Tested adding a call like conda install python=<version>. This doesn't "just work" with older versions like 3.4:

Warning: 'conda-forge' already in 'channels' list, moving to the top
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - conda[version='>=4.5.11'] -> pycosat[version='>=0.6.3'] -> python[version='>=3.6,<3.7.0a0']
  - python=3.4
Use "conda info <package>" to see the dependencies for each package.

I don't know how to map "conda script version" to "works for python version". Ideas welcome.

@TheLastProject
Copy link
Contributor Author

My idea was more based around #5.

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

2 participants