PyPlot issues

Hi,

I am trying to get PyPlot to work but get the
error listed below. This is on macOS 10.12.3.
Any help would be appreciated.

Thanks,

Heinz.

          _

_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type “?help” for help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 0.5.0 (2016-09-19 18:14 UTC)
/ |_|||_’_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin13.4.0

julia> using PyPlot
ERROR: InitError: PyError (:PyImport_ImportModule) <type ‘exceptions.ImportError’>
ImportError(‘No module named mpl_toolkits.mplot3d’,)

in pyerr_check at /Users/bauschke/.julia/v0.5/PyCall/src/exception.jl:56 [inlined]
in pyerr_check at /Users/bauschke/.julia/v0.5/PyCall/src/exception.jl:61 [inlined]
in macro expansion at /Users/bauschke/.julia/v0.5/PyCall/src/exception.jl:81 [inlined]
in pyimport(::String) at /Users/bauschke/.julia/v0.5/PyCall/src/PyCall.jl:391
in init() at /Users/bauschke/.julia/v0.5/PyPlot/src/PyPlot.jl:257
in _include_from_serialized(::String) at ./loading.jl:150
in _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:187
in _require_search_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at ./loading.jl:217
in _require_search_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in require(::Symbol) at ./loading.jl:371
in require(::Symbol) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
during initialization of module PyPlot

Try ENV["PYTHON"]=""; Pkg.build("PyCall") to tell PyCall to use its own (Anaconda-based) Python installation, rather than whatever you happen to have on your machine.

1 Like