Open schlichtanders opened 1 year ago
This seems to be amd64 specific. When running it on arm64, it works without problems.
My workaround recently failed, hence looked again into this issue.
It seems the underlying problem is that PyCall will install "numpy" first. Doing
Conda.add("numpy")
Conda.add("matplotlib")
will fail while the opposite
Conda.add("matplotlib")
Conda.add("numpy")
works without problems.
Unfortunately everyone who uses PyCall will first install numpy and then (maybe) matplotlib. I updated the issue summary respectively.
@stevengj can you take a look?
Found a new workaround by this similar issue https://github.com/JuliaPy/Conda.jl/issues/242, i.e.
setting auto_update_conda: false
in the condarc-julia.yml
file. (must be created top level inside the conda root environment, and should be initialized with the content of the existing .condarc
file next to it).
Here my dockerfile lines which fix Conda.jl successfully for me
# Setting up Conda, Python and R
# this is needed because of a bug https://github.com/JuliaPy/Conda.jl/issues/238
# for the cleanup steps I followed https://jcristharif.com/conda-docker-tips.html
RUN wget -O Miniforge.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" \
&& bash Miniforge.sh -b -p "${USER_HOME_DIR}/conda" \
&& rm Miniforge.sh \
&& source "${USER_HOME_DIR}/conda/etc/profile.d/conda.sh" \
&& cat "${USER_HOME_DIR}/conda/.condarc" > "${USER_HOME_DIR}/conda/condarc-julia.yml" \
&& echo "auto_update_conda: false" >> "${USER_HOME_DIR}/conda/condarc-julia.yml" \
&& conda clean -afy \
&& find ./conda/ -follow -type f -name '*.a' -delete \
&& find ./conda/ -follow -type f -name '*.pyc' -delete \
&& find ./conda/ -follow -type f -name '*.js.map' -delete
ENV PATH="${USER_HOME_DIR}/conda/bin:${PATH}"
ENV CONDA_JL_CONDA_EXE="${USER_HOME_DIR}/conda/bin/conda"
ENV CONDA_JL_HOME="${USER_HOME_DIR}/conda"
# force PyCall.jl use Conda.jl
ENV PYTHON=""
Hi, I am using Conda.jl and it failed on the most recent Julia 1.9.0 docker image to install packages
I explicitly set the environment variable
PYTHON=""
to force using Conda.jl default conda installation. You can for instance start the docker withthen run:
Which should output something like
There is also a related discussion on discourse which states the workaround to preinstall conda with conda==23.1.0. But this is only a workaround.
EDIT: there is another more recent discourse thread which also mentions this problem and had a different workaround.