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

install into global ~/.julia/conda directory #126

Merged
merged 3 commits into from
Oct 12, 2018
Merged

install into global ~/.julia/conda directory #126

merged 3 commits into from
Oct 12, 2018

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Oct 11, 2018

Fixes #123.

In the future, we should allow Pkg projects to use a separate Conda virtualenv and set of packages, but that seems like it will have to wait for persistent package options support (JuliaLang/Juleps#38 or similar).

Drops Julia 0.6 since in Julia 0.6 there is already a single global directory (~/.julia/v0.6/Conda/deps/usr) and I don't think we want to move it.

@stevengj stevengj requested a review from tkf October 11, 2018 21:04
@@ -1,16 +1,21 @@
using Compat

const condadir = abspath(homedir(), ".julia", "conda")
Copy link
Member

Choose a reason for hiding this comment

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

Why not joinpath(DEPOT_PATH[1], "conda")? But maybe it's fine since julia itself hard-codes ~/.julia/config/startup.jl https://github.com/JuliaLang/julia/blob/b519147d60683c3a0ed587925bb7221153b64b65/base/client.jl#L288

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I was following client.jl.

end
if !isdefined(@__MODULE__, :MINICONDA_VERSION)
const MINICONDA_VERSION = "3"
end
if !isdefined(@__MODULE__, :ROOTENV)
const ROOTENV = joinpath(Main.condadir, MINICONDA_VERSION)
Copy link
Member

Choose a reason for hiding this comment

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

I suggested joinpath(Main.condadir, "base") and let conda control the Python version for each Julia environment #123 (comment). But I guess it's OK for a quick fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's still a separate base installation for python 2 and python 3, no? They have completely different miniconda installers.

Copy link
Member

Choose a reason for hiding this comment

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

conda command installed in Miniconda3 can install any Python version registered in anaconda repo like 2.7. So, my thought was that, if you need Python 2 for Julia environment ~/.julia/environments/v1.0-with-py27 then you'd create conda environment ~/.julia/conda/envs/v1.0-with-py27 using ~/.julia/conda/base/bin/conda (which is interpreted by Python 3). But since such mechanism does not exist (and not easily implementable without package options), I thought switching Python 2 and 3 by ENV["CONDA_JL_VERSION"] is a valid workaround.

Copy link
Member

@tkf tkf left a comment

Choose a reason for hiding this comment

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

LGTM! I commented a few nitpickings but none of them are crucial.

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.

2 participants