Hi all,
I am having some trouble getting PyPlot to work with Julia 1.0.1. Starting with a fresh install, running from command line, here’s what I got (sorry it’s a little long):
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.1 (2018-09-29)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
┌ Warning: Terminal not fully functional
└ @ Base client.jl:342
julia> Pkg.status()
ERROR: UndefVarError: Pkg not defined
Stacktrace:
[1] top-level scope at none:0
julia> using Pkg
julia> Pkg.status()
Status `~/.julia/environments/v1.0/Project.toml`
julia> Pkg.add("PyPlot")
Cloning default registries into /Users/kkylin/.julia/registries
Cloning registry General from "https://github.com/JuliaRegistries/General.git"
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Installed Reexport ────────── v0.2.0
Installed VersionParsing ──── v1.1.3
Installed FixedPointNumbers ─ v0.5.3
Installed JSON ────────────── v0.19.0
Installed LaTeXStrings ────── v1.0.3
Installed PyPlot ──────────── v2.6.3
Installed PyCall ──────────── v1.18.5
Installed Conda ───────────── v1.1.1
Installed MacroTools ──────── v0.4.4
Installed Compat ──────────── v1.3.0
Installed Colors ──────────── v0.9.4
Installed ColorTypes ──────── v0.7.5
Updating `~/.julia/environments/v1.0/Project.toml`
[d330b81b] + PyPlot v2.6.3
Updating `~/.julia/environments/v1.0/Manifest.toml`
[3da002f7] + ColorTypes v0.7.5
[5ae59095] + Colors v0.9.4
[34da2185] + Compat v1.3.0
[8f4d0f93] + Conda v1.1.1
[53c48c17] + FixedPointNumbers v0.5.3
[682c06a0] + JSON v0.19.0
[b964fa9f] + LaTeXStrings v1.0.3
[1914dd2f] + MacroTools v0.4.4
[438e738f] + PyCall v1.18.5
[d330b81b] + PyPlot v2.6.3
[189a3867] + Reexport v0.2.0
[81def892] + VersionParsing v1.1.3
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8bb1440f] + DelimitedFiles
[8ba89e20] + Distributed
[b77e0a4c] + InteractiveUtils
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[a63ad114] + Mmap
[44cfe95a] + Pkg
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[1a1011a3] + SharedArrays
[6462fe0b] + Sockets
[2f01184e] + SparseArrays
[10745b16] + Statistics
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
Building Conda ─→ `~/.julia/packages/Conda/uQitS/deps/build.log`
Building PyCall → `~/.julia/packages/PyCall/0jMpb/deps/build.log`
julia> using PyPlot
[ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
[ Info: Installing matplotlib via the Conda matplotlib package...
[ Info: Running `conda install -y matplotlib` in root environment
Solving environment: done
## Package Plan ##
environment location: /Users/kkylin/.julia/conda/3
added / updated specs:
- matplotlib
The following packages will be downloaded:
package | build
---------------------------|-----------------
python-dateutil-2.7.3 | py37_0 260 KB
pytz-2018.5 | py37_0 231 KB
matplotlib-3.0.0 | py37h54f8f79_0 6.8 MB
pyparsing-2.2.2 | py37_0 97 KB
kiwisolver-1.0.1 | py37h0a44026_0 56 KB
freetype-2.9.1 | hb4e5f40_0 864 KB
libpng-1.6.35 | ha441bb4_0 318 KB
cycler-0.10.0 | py37_0 14 KB
tornado-5.1.1 | py37h1de35cc_0 661 KB
------------------------------------------------------------
Total: 9.3 MB
The following NEW packages will be INSTALLED:
cycler: 0.10.0-py37_0
freetype: 2.9.1-hb4e5f40_0
kiwisolver: 1.0.1-py37h0a44026_0
libpng: 1.6.35-ha441bb4_0
matplotlib: 3.0.0-py37h54f8f79_0
pyparsing: 2.2.2-py37_0
python-dateutil: 2.7.3-py37_0
pytz: 2018.5-py37_0
tornado: 5.1.1-py37h1de35cc_0
Downloading and Extracting Packages
python-dateutil-2.7. | 260 KB | ################################################################################################################ | 100%
pytz-2018.5 | 231 KB | ################################################################################################################ | 100%
matplotlib-3.0.0 | 6.8 MB | ################################################################################################################ | 100%
pyparsing-2.2.2 | 97 KB | ################################################################################################################ | 100%
kiwisolver-1.0.1 | 56 KB | ################################################################################################################ | 100%
freetype-2.9.1 | 864 KB | ################################################################################################################ | 100%
libpng-1.6.35 | 318 KB | ################################################################################################################ | 100%
cycler-0.10.0 | 14 KB | ################################################################################################################ | 100%
tornado-5.1.1 | 661 KB | ################################################################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR: InitError: PyError (PyImport_ImportModule) <class 'RuntimeError'>
RuntimeError("The current Numpy installation ('/Users/kkylin/.julia/conda/3/lib/python3.7/site-packages/numpy/__init__.py') fails to pass simple sanity checks. This can be caused for example by incorrect BLAS library being linked in.")
File "/Users/kkylin/.julia/conda/3/lib/python3.7/site-packages/matplotlib/__init__.py", line 141, in <module>
from . import cbook, rcsetup
File "/Users/kkylin/.julia/conda/3/lib/python3.7/site-packages/matplotlib/cbook/__init__.py", line 33, in <module>
import numpy as np
File "/Users/kkylin/.julia/conda/3/lib/python3.7/site-packages/numpy/__init__.py", line 227, in <module>
_sanity_check()
File "/Users/kkylin/.julia/conda/3/lib/python3.7/site-packages/numpy/__init__.py", line 225, in _sanity_check
raise RuntimeError(msg.format(__file__))
Stacktrace:
[1] pyimport(::String) at /Users/kkylin/.julia/packages/PyCall/0jMpb/src/PyCall.jl:486
[2] macro expansion at ./logging.jl:309 [inlined]
[3] pyimport_conda(::String, ::String, ::String) at /Users/kkylin/.julia/packages/PyCall/0jMpb/src/PyCall.jl:653
[4] pyimport_conda at /Users/kkylin/.julia/packages/PyCall/0jMpb/src/PyCall.jl:649 [inlined]
[5] __init__() at /Users/kkylin/.julia/packages/PyPlot/fZuOQ/src/init.jl:174
[6] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:630
[7] _require_from_serialized(::String) at ./loading.jl:681
[8] _require(::Base.PkgId) at ./logging.jl:317
[9] require(::Base.PkgId) at ./loading.jl:855
[10] macro expansion at ./logging.jl:311 [inlined]
[11] require(::Module, ::Symbol) at ./loading.jl:837
during initialization of module PyPlot
As the error suggests, this seems to be a problem involving libopenblas being linked somewhere. But I couldn’t quite figure out a fix. Any pointers would be greatly appreciated!
KL