Question about PyPlot

This error means just what it says. If you run python3 and do import matplotlib in Python, does it work?

By default, on a Mac, PyCall and PyPlot normally install their own Python distro via conda-forge, and then will install Matplotlib for you. You must have overridden this by setting the PYTHON environment variable manually, which is really only for people who know what they are doing.

You don’t need to do it in your startup.jl, and by itself this will do nothing because it only affects building PyCall. You should instead do:

julia> ENV["PYTHON"]=""

pkg> build PyCall

and then re-start Julia.

That’s why PyCall defaults to using Conda.jl to install its own Python on Mac and Windows.

1 Like