PyCall installation failure in Julia's official docker image

I am new to docker and I want to use Julia’s official docker image to run GitLab CI. I need to install PyPlot.jl into the Julia docker image. But, since PyCall.jl is not installed properly, the job is failed. Below are the details:

In the .gitlab-ci.yml, I have the following lines to install PyPlot.jl:

  image: julia:0.6.4
    - julia -e "Pkg.add(\"PyPlot\")"

The pipepline job fails because PyCall.jl is not installed properly.
Here is the command line output on GitLab CI job:

$ julia -e "Pkg.add(\"PyPlot\")"

INFO: Initializing package repository /root/.julia/v0.6
INFO: Cloning METADATA from
INFO: Cloning cache of ColorTypes from
INFO: Cloning cache of Colors from
INFO: Cloning cache of Compat from
INFO: Cloning cache of Conda from
INFO: Cloning cache of FixedPointNumbers from
INFO: Cloning cache of JSON from
INFO: Cloning cache of LaTeXStrings from
INFO: Cloning cache of MacroTools from
INFO: Cloning cache of Nullables from
INFO: Cloning cache of PyCall from
INFO: Cloning cache of PyPlot from
INFO: Cloning cache of Reexport from
INFO: Cloning cache of VersionParsing from
INFO: Installing ColorTypes v0.6.7
INFO: Installing Colors v0.8.2
INFO: Installing Compat v1.0.1
INFO: Installing Conda v1.0.1
INFO: Installing FixedPointNumbers v0.4.6
INFO: Installing JSON v0.17.2
INFO: Installing LaTeXStrings v1.0.2
INFO: Installing MacroTools v0.4.4
INFO: Installing Nullables v0.0.7
INFO: Installing PyCall v1.18.0
INFO: Installing PyPlot v2.6.0
INFO: Installing Reexport v0.1.0
INFO: Installing VersionParsing v1.1.2
INFO: Building Conda
INFO: Building PyCall
Info: Using the Python distribution in the Conda package by default.
To use a different Python version, set ENV[“PYTHON”]=“pythoncommand” and re-run“PyCall”).
Info: Downloading miniconda installer …
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 55.7M 100 55.7M 0 0 89.1M 0 --:–:-- --:–:-- --:–:-- 89.2M
Info: Installing miniconda …
WARNING: bzip2 does not appear to be installed this may cause problems below
/root/.julia/v0.6/Conda/deps/usr/ 343: /root/.julia/v0.6/Conda/deps/usr/ bunzip2: not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
===============================[ ERROR: PyCall ]================================

LoadError: failed process: Process(/root/.julia/v0.6/Conda/deps/usr/ -b -f -p /root/.julia/v0.6/Conda/deps/usr, ProcessExited(1)) [1]
while loading /root/.julia/v0.6/PyCall/deps/build.jl, in expression starting on line 265


================================[ BUILD ERRORS ]================================

WARNING: PyCall had build errors.

  • packages with build errors remain installed in /root/.julia/v0.6
  • build the package(s) and all dependencies with"PyCall")
  • build a single package by running its deps/build.jl script

INFO: Package database updated

When the actual Julia code is run, I got

ERROR: LoadError: LoadError: PyCall not properly installed. Please run"PyCall")

Can someone show me the correct way to install PyPlot.jl/PyCall.jl? Thanks!

1 Like


I end up using a different docker image and the problem has been solved.

What docker image did you end up using? Would you mind sharing the Docker image you used wherein PyCall.jl did work?

Here you go:

You can pick one that satisfies your need based on their user guide.

I ended up making my own Dockerfile for a PyJulia installation: