I’m trying to install PyPlot on my system ( OSX 10.10 ) and is getting this error:
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0 (2017-06-19 13:05 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin13.4.0
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove
julia> Pkg.add( "PyPlot" )
INFO: Installing ColorTypes v0.6.4
INFO: Installing Colors v0.8.1
INFO: Installing FixedPointNumbers v0.4.2
INFO: Installing LaTeXStrings v0.2.1
INFO: Installing PyPlot v2.3.2
INFO: Installing Reexport v0.0.3
INFO: Building Conda
INFO: Building PyCall
INFO: PyCall is using /Users/vish/.julia/v0.6/Conda/deps/usr/bin/python (Python 2.7.13) at /Users/vish/.julia/v0.6/Conda/deps/usr/bin/python, libpython = /Users/vish/.julia/v0.6/Conda/deps/usr/lib/libpython2.7
INFO: /Users/vish/.julia/v0.6/PyCall/deps/deps.jl has not changed
INFO: /Users/vish/.julia/v0.6/PyCall/deps/PYTHON has not changed
INFO: Package database updated
julia> using PyPlot
INFO: Precompiling module PyPlot.
INFO: Installing matplotlib via the Conda matplotlib package...
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment /Users/vish/.julia/v0.6/Conda/deps/usr:
The following NEW packages will be INSTALLED:
matplotlib: 2.1.0-py27h3078195_0
ERROR: InitError: PyError (ccall(@pysym(:PyImport_ImportModule), PyPtr, (Cstring,), name)
The Python package mpl_toolkits.mplot3d could not be found by pyimport. Usually this means
that you did not install mpl_toolkits.mplot3d in the Python version being used by PyCall.
PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package. To install the mpl_toolkits.mplot3d module, you can
use `pyimport_conda("mpl_toolkits.mplot3d", PKG)`, where PKG is the Anaconda
package the contains the module mpl_toolkits.mplot3d, or alternatively you can use the
Conda package directly (via `using Conda` followed by `Conda.add` etcetera).
Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python. As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.
) <type 'exceptions.ImportError'>
ImportError('No module named mpl_toolkits.mplot3d',)
Stacktrace:
[1] pyerr_check at /Users/vish/.julia/v0.6/PyCall/src/exception.jl:56 [inlined]
[2] pyerr_check at /Users/vish/.julia/v0.6/PyCall/src/exception.jl:61 [inlined]
[3] macro expansion at /Users/vish/.julia/v0.6/PyCall/src/exception.jl:81 [inlined]
[4] pyimport(::String) at /Users/vish/.julia/v0.6/PyCall/src/PyCall.jl:374
[5] __init__() at /Users/vish/.julia/v0.6/PyPlot/src/init.jl:205
[6] _include_from_serialized(::String) at ./loading.jl:157
[7] _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:200
[8] _require(::Symbol) at ./loading.jl:491
[9] require(::Symbol) at ./loading.jl:398
during initialization of module PyPlot
I have
julia> PyCall.python
"/Users/vish/.julia/v0.6/Conda/deps/usr/bin/python"
julia> versioninfo()
Julia Version 0.6.0
Commit 903644385b (2017-06-19 13:05 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
julia> Conda.list()
# packages in environment at /Users/vish/.julia/v0.6/Conda/deps/usr:
#
asn1crypto 0.22.0 py27_0
backports 1.0 py27hb4f9756_1
backports.functools_lru_cache 1.4 py27h2aca819_1
backports_abc 0.5 py27h6972548_0
certifi 2017.7.27.1 py27h482ffc0_0
cffi 1.10.0 py27_0
conda 4.3.27 py27h94ab009_0
conda-env 2.6.0 h36134e3_0
cryptography 1.8.1 py27_0
cycler 0.10.0 py27hfc73c78_0
enum34 1.1.6 py27_0
freetype 2.8 h143eb01_0
functools32 3.2.3.2 py27h8ceab06_1
idna 2.5 py27_0
intel-openmp 2018.0.0 hdd0ccc9_7
ipaddress 1.0.18 py27_0
libcxx 4.0.1 h579ed51_0
libcxxabi 4.0.1 hebd6815_0
libgfortran 3.0.1 h93005f0_2
libpng 1.6.32 hce72d48_2
libsodium 1.0.13 hba5e272_2
matplotlib 2.1.0 py27h3078195_0
mkl 2018.0.0 hc285769_4
numpy 1.13.3 py27h62f9060_0
openssl 1.0.2l 0
packaging 16.8 py27_0
pip 9.0.1 py27_1
pycosat 0.6.2 py27_0
pycparser 2.17 py27_0
pyopenssl 17.0.0 py27_0
pyparsing 2.1.4 py27_0
python 2.7.13 0
python-dateutil 2.6.1 py27hd56c96b_1
pytz 2017.2 py27hb891d23_1
readline 6.2 2
requests 2.14.2 py27_0
ruamel_yaml 0.11.14 py27_1
setuptools 27.2.0 py27_0
singledispatch 3.4.0.3 py27he22c18d_0
six 1.10.0 py27_0
sqlite 3.13.0 0
ssl_match_hostname 3.5.0.1 py27h8780752_2
subprocess32 3.2.7 py27h24b2887_0
tk 8.5.18 0
tornado 4.5.2 py27h29aec9e_0
wheel 0.29.0 py27_0
yaml 0.1.6 0
zeromq 4.2.2 h131e0f7_1
zlib 1.2.11 h60db283_