Yes, I can.
I fixed the first problem with:
sudo pip install matplotlib==1.4.3
With other words, PyPlot is using the system libraries, even though I use a
virtual
conda environment. This is just ignored.
Now everything works fine with Julia 0.3 and 0.4, as long as I do not use
precompilation.
After I did:
Pkg.checkout("PyCall")
Pkg.checkout("PyPlot")
Pkg.build("PyCall")
both libraries get precompiled on 0.4, but now I get the following error:
julia> using PyPlot
/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/__init__.py:1155:
UserWarning: This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
warnings.warn(_use_error_msg)
ERROR: InitError: PyError (:PyImport_ImportModule) <type
'exceptions.ImportError'>
ImportError('/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/sip.so:
undefined symbol: PyProperty_Type',)
File
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/pyplot.py",
line 98, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show =
pylab_setup()
File
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/__init__.py",
line 28, in pylab_setup
globals(),locals(),[backend_name],0)
File
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
line 13, in <module>
from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
File
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
line 25, in <module>
from qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
File
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/qt4_compat.py",
line 36, in <module>
import sip
[inlined code] from /home/ufechner/.julia/v0.4/PyCall/src/exception.jl:82
in pyimport at /home/ufechner/.julia/v0.4/PyCall/src/PyCall.jl:315
in __init__ at /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl:245
in _require_from_serialized at loading.jl:84
in _require_from_serialized at ./loading.jl:109
in require at ./loading.jl:186
during initialization of module PyPlot
Any idea?
Am Donnerstag, 10. September 2015 18:20:52 UTC+2 schrieb Mauro:
>
> Works for me. The error suggests that matplotlib doesn't work. Can you
> import in python itself?
>
> $ python
>
> >>> import matplotlib
>
> On Thu, 2015-09-10 at 18:06, Uwe Fechner <[email protected]
> <javascript:>> wrote:
> > Hello,
> >
> > I have a problem with PyPlot on Julia 0.4.0-rc1:
> >
> > julia> using PyPlot
> > ERROR: InitError: Failed to pyimport("matplotlib"): PyPlot will not work
> > until you have a functioning matplotlib module. PyError
> > (:PyImport_ImportModule) <type 'exceptions.ImportError'>
> > ImportError('cannot import name scimath',)
> > File
> >
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/__init__.py",
>
>
> > line 180, in <module>
> > from matplotlib.cbook import is_string_like
> > File
> >
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/cbook.py",
>
>
> > line 33, in <module>
> > import numpy as np
> > File
> >
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/__init__.py",
>
>
> > line 170, in <module>
> > from . import add_newdocs
> > File
> >
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/add_newdocs.py",
>
>
> > line 13, in <module>
> > from numpy.lib import add_newdoc
> > File
> >
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/lib/__init__.py",
>
>
> > line 17, in <module>
> > from . import scimath as emath
> >
> > in __init__ at /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl:232
> > in _require_from_serialized at loading.jl:84
> > in _require_from_serialized at ./loading.jl:109
> > in require at ./loading.jl:186
> > during initialization of module PyPlot
> >
> > julia>
> >
> > Any idea?
> >
> > Uwe Fechner
>
>