Closed Octogonapus closed 11 months ago
If you don't want PyPlot to install its own Conda distro and use that to install matplotlib, then you shouldn't use ENV PYTHON=""
.
That's fair, my mistake. Here is our actual use case:
FROM ubuntu:22.04
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y wget python3-venv && \
rm -rf /var/lib/apt/lists/*
RUN wget -nv https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.1-linux-x86_64.tar.gz && \
tar xf julia-1.9.1-linux-x86_64.tar.gz && \
rm julia-1.9.1-linux-x86_64.tar.gz && \
ln -s /julia-1.9.1/bin/julia /usr/local/bin/julia
RUN python3 -m venv venv
RUN . venv/bin/activate && \
pip install -U pip && \
pip install -U matplotlib==3.7.0
ENV PYTHON="/root/venv/bin/python"
RUN julia -e 'import Pkg; Pkg.add("PyPlot")'
RUN julia -e 'using PyPlot'
The same error occurs:
> [7/7] RUN julia -e 'using PyPlot':
#0 1.434 [ Info: Installing matplotlib via the Conda matplotlib package...
#0 1.435 [ Info: Running `conda install -y matplotlib` in root environment
#0 1.892 Collecting package metadata (current_repodata.json): ...working... done
#0 17.04 Solving environment: ...working... unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
#0 23.96 Solving environment: ...working... unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
#0 27.86
#0 27.86 ResolvePackageNotFound:
#0 27.86 - conda==23.1.0
I'm trying to install the latest version of PyPlot on Julia v1.9.1 on Ubuntu 22.04 and getting this error:
Here's a Dockerfile you can build to reproduce the error:
And here is the full error: