Closed
Description
I use anaconda to install jupyter ect. on my ubuntu.
I just installed julias 0.4.X few days ago and there was no problem using PyPlot.
However, after I update my conda packages today, PyPlot cannot beused;
Here's the command I used to update my packages:
conda update conda
conda update anaconda
Now, in julia, everytime I call "using PyPlot",
it seems that it cannot find the matplotlib packages;
Julia keeps telling me to install the latest (.15?) one.
But I can import matplotlib in my python code normally......
Julia is really fascinating, I really enjoy its performances.
Can you help solving this problem?
Activity
stevengj commentedon Jan 5, 2016
Try
Pkg.build("PyCall")
to make sure PyCall's configuration is up to date.What error message do you get if you type
using PyCall; pyimport("matplotlib")
.fish830617 commentedon Jan 5, 2016
Below is the error message I got after
Pkg.build("PyCall")
and thenusing PyCall; pyimport("matplotlib")
ERROR: PyError (:PyImport_ImportModule) <class 'ImportError'>
ImportError('/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/linalg/lapack_lite.cpython-34m.so: undefined symbol: zgelsd_',)
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/matplotlib/init.py", line 122, in
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/matplotlib/cbook.py", line 32, in
import numpy as np
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/init.py", line 180, in
from . import add_newdocs
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/lib/init.py", line 18, in
from .polynomial import *
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/lib/polynomial.py", line 20, in
from numpy.linalg import eigvals, lstsq, inv
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/linalg/init.py", line 51, in
from .linalg import *
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/linalg/linalg.py", line 29, in
from numpy.linalg import lapack_lite, _umath_linalg
[inlined code] from /home/chiayufang/.julia/v0.4/PyCall/src/exception.jl:81
in pyimport at /home/chiayufang/.julia/v0.4/PyCall/src/PyCall.jl:302
And below is the error message I got after direct
using PyPlot
ERROR: InitError: Failed to pyimport("matplotlib"): PyPlot will not work until you have a functioning matplotlib module.
For automated Matplotlib installation, try configuring PyCall to use the Conda Python distribution within Julia. Relaunch Julia and run:
ENV["PYTHON"]=""
Pkg.build("PyCall")
using PyPlot
pyimport exception was: PyError (:PyImport_ImportModule) <class 'ImportError'>
ImportError('/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/linalg/lapack_lite.cpython-34m.so: undefined symbol: zgelsd_',)
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/matplotlib/init.py", line 122, in
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/matplotlib/cbook.py", line 32, in
import numpy as np
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/init.py", line 180, in
from . import add_newdocs
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/lib/init.py", line 18, in
from .polynomial import *
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/lib/polynomial.py", line 20, in
from numpy.linalg import eigvals, lstsq, inv
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/linalg/init.py", line 51, in
from .linalg import *
File "/home/chiayufang/anaconda3/lib/python3.4/site-packages/numpy/linalg/linalg.py", line 29, in
from numpy.linalg import lapack_lite, _umath_linalg
in init at /home/chiayufang/.julia/v0.4/PyPlot/src/PyPlot.jl:229
in _require_from_serialized at loading.jl:84
in require at ./loading.jl:251
during initialization of module PyPlot
But I am sure that
matplotlib
is installed, since afterconda update matplotlib
I gotAll requested packages already installed.
packages in environment at /home/chiayufang/anaconda3:
matplotlib 1.5.0 np110py34_0
Also I can import and plot with matplotlib in python 3 as usual.
I don't understand why....
Hope these information are useful to you and wish this problem can be fixed soon!
stevengj commentedon Feb 5, 2016
Duplicate of JuliaPy/PyCall.jl#65.
Should be fixed by the latest Julia, but you may have to delete some old
openblas
libraries from previous Julia installs.