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

Correct Python version is not correctly chosen #91

Open
pradal opened this issue Nov 7, 2018 · 8 comments
Open

Correct Python version is not correctly chosen #91

pradal opened this issue Nov 7, 2018 · 8 comments
Assignees

Comments

@pradal
Copy link
Contributor

pradal commented Nov 7, 2018

The Python version was chosen using CONDA_VERSION.
When CONDA_VERSION was 2, Python 2 was selected.
Otherelse, Python 3 was chosen.

However, this is not longer true. We have to specify explictly both CONDA_VERSION and PYTHON_VERSION in travis and appveyor

@pfernique
Copy link
Contributor

When did it worked ? When dit it stopped ?
As you can see, your travis_ci repository is seriously late with regards to the one of StatisKit.

@pradal
Copy link
Contributor Author

pradal commented Nov 7, 2018

Hi Pierre, nice to read you.
I think that because we do not had before both Python 2 and Python 3 packages, evrything worked as expected.
Moreover, is old conda releases, conda 3 were mainly used with py3, while conda 2 with py2. Now this is not the case.

Do you think is usefull that we upgrade the travis-ci version? What are the changelogs?
Thanks for your advices.

@pradal
Copy link
Contributor Author

pradal commented Nov 7, 2018

In conda documentation with Travis, they promote the use of $TRAVIS_PYTHON_VERSION to create new conda environment.

Do you manage explicitly the Python version?

@pfernique
Copy link
Contributor

I don't understand what you mean with
Moreover, is old conda releases, conda 3 were mainly used with py3, while conda 2 with py2. Now this is not the case.
In my scripts when CONDA_VERSION=2, miniconda 2 is installed and when CONDA_VERSION=3, miniconda 3 is installed.
Then, in conda builds the argument --python=${PYTHON_MAJOR}.${PYTHON_MINOR} is used

@pradal
Copy link
Contributor Author

pradal commented Nov 7, 2018

To clarify: You may have both Python 2 or Python 3 version with conda 2 and conda 3.
So when you create a new env, you can pass the python ersion you wante to use. Idenpendently of the version of conda.

The logic I would like is:

  1. Either set CONDA_VERSION and PYTHON_VERSION as ENV variables

  2. If Python_version is not defined, use CONDA_VERSION

    • PYTHON_VERSION=CONDA_VERSION
  3. Or use TRAVIS_PYTHON_VERSION

@pfernique
Copy link
Contributor

Well... This feature is old but I do not recommend it on Travis nor Appveyor since I encountered serious issues (wrong version of Python used in the build or as a dependency). Moreover, on CI there is no problem to install different versions of Conda. I think this is a more robust solution.

@pfernique
Copy link
Contributor

But still, it could be possible to control the Conda version using PYTHON_VERSION if defined. But do we want something like 2.x, for the latest minor, and 3.6, for a previous minor ? Or simply 2 and 3 ? I will have some time next week to do so if you want.

@pradal
Copy link
Contributor Author

pradal commented Nov 8, 2018

I think we can just add the PYTHON_VERSION explicitly.
CONDA_VERSION is fine for me. If PYTHON_VERSION is not set, I will just define PYTHON_VERSION=$CONDA_VERSION

Otherelse, we can set PYTHON_VERSION to 2.7, 3.5, 3.6, 3.7 like done in travis.
We can even just do

PYTHON_VERSION=$TRAVIS_PYTHON_VERSION

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