Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use PyPlot after conda update #186

Closed
fish830617 opened this issue Jan 1, 2016 · 3 comments
Closed

Cannot use PyPlot after conda update #186

fish830617 opened this issue Jan 1, 2016 · 3 comments

Comments

@fish830617
Copy link

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?

@stevengj
Copy link
Member

stevengj commented 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
Copy link
Author

Below is the error message I got after Pkg.build("PyCall") and then using 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 after conda update matplotlib I got


All 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
Copy link
Member

stevengj commented 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.

@stevengj stevengj closed this as completed Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants