0
votes

Just installed Julia 1.0.0 from julialang.org
Did the following:

using Pkg

Pkg.add("PyPlot") using PyPlot

. . . got this error: The Python package matplotlib could not be found by pyimport. Usually this means that you did not install matplotlib in the Python version being used by PyCall.

I have installed anaconda.

HERE IS FULL JULIA 1.0.0 LOG...………

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Pkg

julia> Pkg.add("PyPlot")
  Updating registry at `C:\Users\douglaskbell\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `C:\Users\douglaskbell\.julia\environments\v1.0\Project.toml`
 [no changes]
  Updating `C:\Users\douglaskbell\.julia\environments\v1.0\Manifest.toml`
 [no changes]

julia> using PyPlot
[ Info: Installing matplotlib via the Conda matplotlib package...
[ Info: Running `conda install -y matplotlib` in root environment
Solving environment: done

# All requested packages already installed.

ERROR: InitError: PyError (PyImport_ImportModule

The Python package matplotlib could not be found by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.
1
Do you try to use a global python installation or let Julia install a python version for you?carstenbauer

1 Answers

1
votes

Does this help (setting the right path to the anaconda python binary)?

ENV["PYTHON"] = "c:\\full\\path\\to\\anaconda\\bin\\python"
using Pkg
Pkg.build("PyCall")
using PyPlot