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

WIP towards make PyCall use Conda if system python is not found #191

Merged
merged 1 commit into from
Sep 24, 2015

Conversation

dhoegh
Copy link
Contributor

@dhoegh dhoegh commented Sep 13, 2015

This is a WIP towards figuring out how Conda can be used as a replacement of system python and it is parallel work to JuliaLang/IJulia.jl#357.
I still haven't figured out the API for how PyPlot/PyCall/IJulia should interact with Conda and if they should require Conda or if the user should add Conda.

@stevengj
Copy link
Member

The difficulty with this is that many people using PyCall will be Python users who want to call Python packages that they've installed by their familiar way in Python. If PyCall uses Conda's Python, they will be surprised because it won't find any of the packages they've installed with their regular Python.

@dhoegh
Copy link
Contributor Author

dhoegh commented Sep 15, 2015

Yes that is the reasoning about not requiring Conda, but if Conda is installed then it prefers the python distribution in Conda. This means the changes will not affect people having a system wide python and do not have Conda installed.

@dhoegh
Copy link
Contributor Author

dhoegh commented Sep 22, 2015

I have updated the PR. The miniconda python distribution in Conda only takes up 123 MB when nothing is installed which acceptable. I have added a use_conda constant for the purpose of automatically installation of python dependencies when Conda is used. This is shown in JuliaPy/PyPlot.jl#170.

@dhoegh dhoegh changed the title WIP towards using Conda as default. WIP towards make PyCall use Conda if system python is not found Sep 22, 2015
@@ -1,4 +1,7 @@
using Base.Test, PyCall, Compat
import Conda

PyCall.use_conda && Conda.add("numpy")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably Conda.add("numpy") should be done in Pkg.build, since it is generally a good idea to have NumPy with PyCall, to support zero-copy arrays.

@stevengj
Copy link
Member

Would be good to have Travis testing too. Maybe just add Python 2.6 to the Travis tests, if that is allowed by Travis. With the version check I suggested above, that will force Pkg.build to use Conda.

@dhoegh
Copy link
Contributor Author

dhoegh commented Sep 23, 2015

I have addressed your comments. Maybe you could cancel the old appveyor build to reduce the load on appveyor.

@stevengj
Copy link
Member

cancelled the build.

@stevengj
Copy link
Member

Travis is failing with could not spawn /home/travis/.julia/v0.3/Conda/deps/usr/python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))": no such file or directory (ENOENT)

Probably, python is in Conda.BINDIR on non-Windows systems.

(I don't understand why they couldn't just use the same paths on Unix and Windows.)

@dhoegh
Copy link
Contributor Author

dhoegh commented Sep 23, 2015

I have made a PR to Conda.jl to add PYTHONDIR. I will comeback tomorrow and finish.

@Luthaf
Copy link

Luthaf commented Sep 23, 2015

(I don't understand why they couldn't just use the same paths on Unix and Windows.)

Because they reproduce the way Python is packaged on Windows. But I have no idea why it was done so for Python in the first place.

@tkelman
Copy link
Contributor

tkelman commented Sep 23, 2015

endless frustration caused by someone deciding to be different on different platforms decades ago

@dhoegh
Copy link
Contributor Author

dhoegh commented Sep 24, 2015

Everything is passing now.

stevengj added a commit that referenced this pull request Sep 24, 2015
WIP towards make PyCall use Conda if system python is not found
@stevengj stevengj merged commit 0f61eea into JuliaPy:master Sep 24, 2015
@stevengj
Copy link
Member

Thanks!

stevengj added a commit that referenced this pull request Sep 24, 2015
dhoegh referenced this pull request in JuliaPy/Conda.jl Nov 25, 2015
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

Successfully merging this pull request may close these issues.

None yet

4 participants