-
Notifications
You must be signed in to change notification settings - Fork 57
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
Conversation
…e can have multiple versions installed simultaneously for different projects
@@ -1,16 +1,21 @@ | |||
using Compat | |||
|
|||
const condadir = abspath(homedir(), ".julia", "conda") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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.