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

Conda.add may downgrade Python #127

Open
tkf opened this issue Oct 11, 2018 · 2 comments · May be fixed by JuliaPy/PyCall.jl#613
Open

Conda.add may downgrade Python #127

tkf opened this issue Oct 11, 2018 · 2 comments · May be fixed by JuliaPy/PyCall.jl#613

Comments

@tkf
Copy link
Member

tkf commented Oct 11, 2018

If a package installed via Conda.add is not available for installed Python version, conda may downgrade Python:
https://discourse.julialang.org/t/help-understanding-pycall-related-travis-failure/15957

The error is cryptic when it's installed via pyimport_conda since the Python installed in disk is different from the one loaded in PyCall.

Maybe we should pin Python version and provide a nicer error message pointing to a command that re-builds Conda and PyCall? Or detect change in Python version, automatically run Pkg.build, and then throw an error with message saying that you need to restart Julia?

@stevengj
Copy link
Member

stevengj commented Oct 12, 2018

Pinning Python or having a better error message in pyimport_conda seems like a good idea, but an issue for PyCall.jl, not Conda.jl?

I'm beginning to think that #108 was a mistake … Python 3 is just causing way too many problems. Maybe we should default to installing a slightly older version of Python 3?

@tkf
Copy link
Member Author

tkf commented Oct 12, 2018

I think switching to Python 3 is a good choice. matplotlib 3.0 just dropped Python 2 and pandas is going to switch to Python 3-only soon https://python3statement.org/#sections40-timeline

a slightly older version of Python 3

Yeah, this issue is more like 3.6-vs-3.7 than 2-vs-3. I guess it's safer to run conda install python=3.(x-1) in build.jl after Python 3.x is released (say for 6 months or maybe even one year).

an issue for PyCall.jl, not Conda.jl

Yeah, I wasn't sure which issue tracker I should post this.

tkf added a commit to tkf/PyCall.jl that referenced this issue Nov 8, 2018
If a package installed via `Conda.add` is not available for installed
Python version, `conda` may downgrade Python:
https://discourse.julialang.org/t/help-understanding-pycall-related-travis-failure/15957

This brakes PyCall because it stores the path to libpython etc.  This
patch provides a workaround to the issue by adding an API that wraps
`Conda.add` and re-build PyCall if Python version is changed during
installation of conda packages.

fix JuliaPy/Conda.jl#127
tkf added a commit to tkf/PyCall.jl that referenced this issue Nov 8, 2018
If a package installed via `Conda.add` is not available for installed
Python version, `conda` may downgrade Python:
https://discourse.julialang.org/t/help-understanding-pycall-related-travis-failure/15957

This brakes PyCall because it stores the path to libpython etc.  This
patch provides a workaround to the issue by adding an API that wraps
`Conda.add` and re-build PyCall if Python version is changed during
installation of conda packages.

fix JuliaPy/Conda.jl#127
tkf added a commit to tkf/PyCall.jl that referenced this issue Nov 8, 2018
If a package installed via `Conda.add` is not available for installed
Python version, `conda` may downgrade Python:
https://discourse.julialang.org/t/help-understanding-pycall-related-travis-failure/15957

This brakes PyCall because it stores the path to libpython etc.  This
patch provides a workaround to the issue by adding an API that wraps
`Conda.add` and re-build PyCall if Python version is changed during
installation of conda packages.

fix JuliaPy/Conda.jl#127
tkf added a commit to tkf/PyCall.jl that referenced this issue Nov 8, 2018
If a package installed via `Conda.add` is not available for installed
Python version, `conda` may downgrade Python:
https://discourse.julialang.org/t/help-understanding-pycall-related-travis-failure/15957

This brakes PyCall because it stores the path to libpython etc.  This
patch provides a workaround to the issue by adding an API that wraps
`Conda.add` and re-build PyCall if Python version is changed during
installation of conda packages.

fix JuliaPy/Conda.jl#127
tkf added a commit to tkf/PyCall.jl that referenced this issue Nov 8, 2018
If a package installed via `Conda.add` is not available for installed
Python version, `conda` may downgrade Python:
https://discourse.julialang.org/t/help-understanding-pycall-related-travis-failure/15957

This breaks PyCall because it stores the path to libpython etc.  This
patch provides a workaround to the issue by adding an API that wraps
`Conda.add` and re-build PyCall if Python version is changed during
installation of conda packages.

fix JuliaPy/Conda.jl#127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants