[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
Hi, First: I usually find PyPlot very robust... but am having trouble lately (sounds similar to your problems). *I try to keep my environment simple/clean:* Xubuntu 14.04 +Install Anaconda 2.4.1 (Newer version) +Install Julia 0.4 using : sudo add-apt-repository ppa:staticfloat/juliareleases sudo apt-get update sudo apt-get install julia Anyways, it seems like PyPlot is having issues working with certain combinations of numpy, matplotlib, and the graphic systems (looking at the compile error messages). *My Solution* After playing around a bit, I got PyPlot to work by using the following combination: conda install numpy=1.9.2 matplotlib=1.4 Though it seems like specifying an older cairo can help sometimes conda install numpy=1.9.2 cairo=1.12.2 matplotlib=1.4 NOTE: This solution seems very similar to the solution from Daniel Høegh: https://groups.google.com/d/msg/julia-users/kZQrK8-nmQ8/4NfSNGSRAwAJ ("PyPlot not working on 0.4.0") ...But his solution does not work for me. *Comments* I do not really understand the root cause of this issue, but I can say the following: 1. Installing numpy 1.9.3 or higher breaks my PyPlot. 2. Installing matplotlib 1.5 breaks my PyPlot. 3. "conda install" seems to work better if you sepcify all simultaneous requirements in a single statement. *Debug Tips* I can quickly determine if my Anaconda/PyPlot solution is working, by using the following steps: 1. Change the active group of python packages conda install ... 2. Rebuild pyplot & try loading it (which compiles as well): Pkg.build("PyPlot") using PyPlot #Re-compilation might/might not fail
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
On Friday, September 18, 2015 at 1:10:45 PM UTC-4, Tommy Foley wrote: > > Any updates on this? I still can not seem to fix it. I have checked > multiple git conversations and they seem to have closed the issue, but I > have the master branch and am still getting the same error. > PyPlot works fine with 0.4 on many Python installations. There are still individual cases where there are problems. e.g. there are some path issues with Enthought Canopy Python that prevent PyCall from finding Python modules (https://github.com/stevengj/PyCall.jl/issues/42), and on some Linux distros there is a conflict between NumPy's OpenBLAS and Julia's OpenBLAS (https://github.com/stevengj/PyCall.jl/issues/65). Because there is such a huge variety of Python installations, there's no single way in which things can go wrong (e.g. library conflicts or path snafus). If you are still having problems, look for the relevant PyCall or PyPlot issue.
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
Any updates on this? I still can not seem to fix it. I have checked multiple git conversations and they seem to have closed the issue, but I have the master branch and am still getting the same error. On Thursday, September 10, 2015 at 12:06:30 PM UTC-4, Uwe Fechner 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) > ImportError('cannot import name scimath',) > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/__init__.py", > > line 180, in > from matplotlib.cbook import is_string_like > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/cbook.py", > > line 33, in > import numpy as np > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/__init__.py", > > line 170, in > from . import add_newdocs > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/add_newdocs.py", > > line 13, in > from numpy.lib import add_newdoc > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/lib/__init__.py", > > line 17, in > 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 > >
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
This fixed my problem on OS X, but not Ubuntu: https://github.com/stevengj/PyCall.jl/issues/65 I have spent the better part of a day trying to track this down, and am severely confused. On Friday, September 11, 2015 at 3:50:59 PM UTC-4, Steven G. Johnson wrote: > > > > On Thursday, September 10, 2015 at 3:49:24 PM UTC-4, g wrote: >> >> I have a different failure with PyPlot, this is the first thing I tried >> after installing the 0.4.0-rc1 osx binary, Pkg.add("PyPlot");using PyPlot >> > > You need the master version of PyPlot with 0.4 at the moment: > > Pkg.checkout("PyCall"); Pkg.build("PyCall") >
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
On Thursday, September 10, 2015 at 3:49:24 PM UTC-4, g wrote: > > I have a different failure with PyPlot, this is the first thing I tried > after installing the 0.4.0-rc1 osx binary, Pkg.add("PyPlot");using PyPlot > You need the master version of PyPlot with 0.4 at the moment: Pkg.checkout("PyCall"); Pkg.build("PyCall")
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
I am still having the same problem with PyPlot. I couldn't get it to work in .3.10 for more than one session, before it broke. LoadError: LoadError: InitError: Failed to pyimport("matplotlib"): PyPlot will not work until you have a functioning matplotlib module. PyError (:PyImport_ImportModule) ImportError('cannot import name scimath',) File "/home/tommy/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 180, in from matplotlib.cbook import is_string_like File "/home/tommy/anaconda/lib/python2.7/site-packages/matplotlib/cbook.py", line 33, in import numpy as np File "/home/tommy/anaconda/lib/python2.7/site-packages/numpy/__init__.py", line 170, in from . import add_newdocs File "/home/tommy/anaconda/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "/home/tommy/anaconda/lib/python2.7/site-packages/numpy/lib/__init__.py", line 17, in from . import scimath as emath during initialization of module PyPlot while loading /home/tommy/.julia/v0.4/PyPlot/src/PyPlot.jl, in expression starting on line 653 while loading In[2], in expression starting on line 1 in __init__ at /home/tommy/.julia/v0.4/PyPlot/src/PyPlot.jl:232 in include at ./boot.jl:260 in include_from_node1 at ./loading.jl:271 in require at ./loading.jl:210 On Thursday, September 10, 2015 at 2:20:30 PM UTC-4, Uwe Fechner wrote: > > This is not yet fixed. > > I deleted .jula/v0.4/PyCall and .jula/v0.4/PyPlot. > Then I did: > Pkg.update() > Pkg.checkout("PyCall") > Pkg.checkout("PyPlot") > Pkg.build("PyCall") > using PyPlot > > This works fine. But if I restart Julia > and do using PyPlot again, I get the error: > > julia> tic(); using PyPlot; toc(); > /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: LoadError: InitError: PyError (:PyImport_ImportModule) '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 > _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 > 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 > 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 > 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 include at ./boot.jl:260 > in include_from_node1 at ./loading.jl:271 > in require at ./loading.jl:210 > during initialization of module PyPlot > while loading /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl, in > expression starting on line 653 > > Any idea? > > Uwe Fechner > > > Am Donnerstag, 10. September 2015 18:51:32 UTC+2 schrieb Steven G. Johnson: >> >> Just merged a fix, I think. >> >> I've fallen behind a bit on PyCall and PyPlot issues, but I'll be >> cleaning things up over the next few days since I need these for my class >> soon. >> >
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
I have a different failure with PyPlot, this is the first thing I tried after installing the 0.4.0-rc1 osx binary, Pkg.add("PyPlot");using PyPlot *julia> **using PyPlot* WARNING: could not import Base.help into PyCall Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] ImportError: No module named site The problem appears to be *julia> **ENV["PYTHONHOME"]* *ERROR: KeyError: PYTHONHOME not found* despite the fact that if I launch julia 3.10 in the same terminal "PYTHONHOME" is defined and PyPlot works. Julia Version 0.4.0-rc1 Commit e5c6964 (2015-09-09 16:07 UTC) Platform Info: System: Darwin (x86_64-apple-darwin13.4.0) CPU: Intel(R) Core(TM) i5-2500S CPU @ 2.70GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge) LAPACK: libopenblas LIBM: libopenlibm LLVM: libLLVM-3.3
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
This is not yet fixed. I deleted .jula/v0.4/PyCall and .jula/v0.4/PyPlot. Then I did: Pkg.update() Pkg.checkout("PyCall") Pkg.checkout("PyPlot") Pkg.build("PyCall") using PyPlot This works fine. But if I restart Julia and do using PyPlot again, I get the error: julia> tic(); using PyPlot; toc(); /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: LoadError: InitError: PyError (:PyImport_ImportModule) 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 _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 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 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 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 include at ./boot.jl:260 in include_from_node1 at ./loading.jl:271 in require at ./loading.jl:210 during initialization of module PyPlot while loading /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl, in expression starting on line 653 Any idea? Uwe Fechner Am Donnerstag, 10. September 2015 18:51:32 UTC+2 schrieb Steven G. Johnson: > > Just merged a fix, I think. > > I've fallen behind a bit on PyCall and PyPlot issues, but I'll be cleaning > things up over the next few days since I need these for my class soon. >
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
Just merged a fix, I think. I've fallen behind a bit on PyCall and PyPlot issues, but I'll be cleaning things up over the next few days since I need these for my class soon.
[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5
I tried it also with Julia 0.3.11. Same error. If I use ipython, import matplotlib works fine. In [2]: matplotlib.__version__ Out[2]: '1.4.3' In [3]: I used conda on ubuntu 14.04, 64 bit to install matplotlib. Am Donnerstag, 10. September 2015 18:06:30 UTC+2 schrieb Uwe Fechner: > > 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) > ImportError('cannot import name scimath',) > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/__init__.py", > > line 180, in > from matplotlib.cbook import is_string_like > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/cbook.py", > > line 33, in > import numpy as np > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/__init__.py", > > line 170, in > from . import add_newdocs > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/add_newdocs.py", > > line 13, in > from numpy.lib import add_newdoc > File > "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/lib/__init__.py", > > line 17, in > 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 > >