JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.45k stars 186 forks source link

Error building docker image for project using PyCall #983

Closed alenskorobogatova closed 2 years ago

alenskorobogatova commented 2 years ago

I want to build Docker image for my project, that is using PyCall. I get following error:

ERROR: Error building `PyCall`: 
PREFIX=/root/.julia/conda/3
Unpacking payload ...
/root/.julia/conda/3/installer.sh: line 363: /root/.julia/conda/3/conda.exe: not found
/root/.julia/conda/3/installer.sh: line 366: can't open /root/.julia/conda/3/preconda.tar.bz2: no such file
┌ Info: Using the Python distribution in the Conda package by default.
└ To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run Pkg.build("PyCall").
[ Info: Downloading miniconda installer ...
[ Info: Installing miniconda ...
ERROR: LoadError: failed process: Process(`/root/.julia/conda/3/installer.sh -b -f -p /root/.julia/conda/3`, ProcessExited(1)) [1]

Minimal working example: https://github.com/alenskorobogatova/ExamplePyCall.jl

stevengj commented 2 years ago

I wouldn't use Conda at all, I would install Python stuff separately in your image and tell PyCall to use that, setting the PYTHON environment variable if necessary. (Using the system Python is the default on Unix systems other than MacOS.)

See, for example: https://github.com/mitmath/binder-env

stevengj commented 2 years ago

(In any case, closing this issue as it has nothing to do with PyCall per se, but rather has to do with Conda.jl.)