Open Michelle-NYX opened 5 years ago
What happens if you do
rm -rf /Users/NYX/.julia/conda/3
bash /Users/NYX/.julia/conda/3/installer.sh -b -f -p /Users/NYX/.julia/conda/3
in your system shell? Also, what bash /Users/NYX/.julia/conda/3/installer.sh -h
prints?
I think this was caused by issues with detecting conda
executable in Conda.jl#L80 and Conda.jl#L152, since update conda@4.4.0#recommended-change-to-enable-conda-in-your-shell.
Basically executable conda
will only exists in base environment like $HOME/miniconda3/bin
, and no longer duplicates under other environment like $HOME/miniconda3/envs/conda_jl/bin
. Locating conda
executable is recommended through environment variable $CONDA_EXE
(which will point to $HOME/miniconda3/bin
by default).
Note that this issue occurs for new installation of conda=>4.4.0
, and will impact IJulia
when try to call noteboook()
.
More reference to CONDA_EXE
:
conda.sh
functions.sh
The whole point of Conda.jl is to install its own Miniconda distro, independent of whatever you may happen to have installed on your system. It should not be using the conda
in $HOME/miniconda3/bin
unless you specifically told it to by setting CONDA_JL_HOME
and re-building Conda.
In particular, Conda.jl intentionally ignores the value of CONDA_EXE
and any other CONDA_*
environment variables.
It sounds like we may also need to sanitize the environment when running the miniconda installer?
unless you specifically told it to by setting
CONDA_JL_HOME
and re-building Conda
I think what @Quar is saying is exactly that case. See #146 for more discussion. I think custom CONDA_JL_HOME
case can be improved more and #146 is a nice way forward. (I haven't had chance to review @Quar's other branch linked in that PR yet.)
Having said that, I don't know if @Michelle-NYX's original problem is due to CONDA_JL_HOME
.
It sounds like we may also need to sanitize the environment when running the miniconda installer?
It looks like Miniconda3 installer (v4.5.12) does not look at CONDA_EXE
.
$ grep -a CONDA_ Miniconda3-latest-Linux-x86_64.sh
__conda_setup="\$(CONDA_REPORT_ERRORS=false '$PREFIX/bin/conda' shell.bash hook 2> /dev/null)"
CONDA_CHANGEPS1=false conda activate base
and these CONDA_*
does not seem to be used at install time (they are written to bashrc):
$ grep -a CONDA_ Miniconda3-latest-Linux-x86_64.sh -C5
fi
cat <<EOF >> "$BASH_RC"
# added by Miniconda3 4.5.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="\$(CONDA_REPORT_ERRORS=false '$PREFIX/bin/conda' shell.bash hook 2> /dev/null)"
if [ \$? -eq 0 ]; then
\\eval "\$__conda_setup"
else
if [ -f "$PREFIX/etc/profile.d/conda.sh" ]; then
. "$PREFIX/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\\export PATH="$PREFIX/bin:\$PATH"
fi
fi
unset __conda_setup
@Michelle-NYX Do you remember if you set CONDA_JL_HOME
when you had the error?
After successfully added and built Conda package, I cannot add any library (NumPy or matplotlib) with the following error:
It doesn't help if I remove and re-install the Conda. I've also tried to delete the /miniconda3 folder, which doesn't help as well.