Closed tkf closed 4 years ago
I'm still unclear why it is necessary to set the PATH
. Can't you just run python
by specifying the full pathname?
I don't know, but from https://github.com/JuliaLang/IJulia.jl/issues/739#issuecomment-422989285 and https://github.com/JuliaPy/Conda.jl/issues/119#issuecomment-422253252 (and that conda
is not super well-behaved package manager, at least ATM), I just thought I'd try. But making the test in #122 fail properly was already hard...
BTW, when I run conda shell.powershell activate base
(which is, I suppose, the internal of conda activate
), I get:
$env:CONDA_DEFAULT_ENV = "base"
$env:CONDA_EXE = "/home/takafumi/miniconda3/bin/conda"
$env:CONDA_PREFIX = "/home/takafumi/miniconda3"
$env:CONDA_PROMPT_MODIFIER = "(base) "
$env:CONDA_PYTHON_EXE = "/home/takafumi/miniconda3/bin/python"
$env:CONDA_SHLVL = "1"
$env:PATH = "/home/takafumi/miniconda3\bin;..."
(the output is weird since I'm on linux)
So it seems PATH
is the only relevant thing conda activate ...
alters.
So it turned out Windows searches PATH
for a DLL https://msdn.microsoft.com/en-us/library/7d83bc18.aspx?f=255&MSPPError=-2147217396 (via https://github.com/ContinuumIO/anaconda-issues/issues/10082#issuecomment-422834341)
But only (random?) half of the tests are fixed by this https://ci.appveyor.com/project/StevenGJohnson/conda-jl/build/1.0.121 So strange...
Reading https://github.com/ContinuumIO/anaconda-issues/issues/10082, it looks like it would be fixed on conda side. Maybe it's better to do Conda.add("python=3.6")
inside Conda._install_conda
while waiting for that?
I'm worried that this will also screw up PyCall… importing Python modules won't work if the Python modules depend on the PATH
being set.
Yeah, Conda.jl has to mutate ENV
. Or maybe PyCall.jl can temporary mutate ENV
in pyimport_conda
? (Similar hack for LD_LIBRARY_PATH
on Linux won't work, but I don't know what happens in Windows.)
But that's ugly so Conda.add("python=3.6")
started sound better to me... Or using slightly old miniconda3 URL would be the easiest solution?
Sorry I haven't looked at this for a while. CI is failing?
I forgot the status of this PR :)
But I remember thinking that new conda version may provide a better way to do this (via conda run
). I'll check if we can do this without hard-coding the paths for Windows.
It looks like #170 supersedes this PR. Closing...
close #125