-
Notifications
You must be signed in to change notification settings - Fork 89
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
PyPlot not initializing; pltm not defined #108
Comments
Are you using Canopy/EPD Python? Canopy isn't supported (JuliaPy/PyCall.jl#42), and I would recommend Anaconda if that is the case. |
No, I am using the Python 2.7.8 that comes with OpenSUSE. I installed python and matplotlib through zypper install. Is anaconda required for this package? |
No, Anaconda is not required. Does Pkg.test("PyCall") work? |
No it does not. Here is the output ===============================[ ERROR: PyCall ]================================ failed process: Process( INFO: No packages to install, update or remove |
I am actually suspicious that the culprit might be the precompiled binary julia distribution I am using. I compiled v0.4 from git, and the tests are passing. Is there anyway I can obtain v0.3 from git? Or if v0.4 is stable enough do you recommend? I saw there are some issues with cairo on v0.4, but if everything else is better there, maybe I should just use 0.4..? |
Confirmed, it is an issue with the precompiled julia binary. Built julie v0.3.4-pre from git, and everything works great. |
Great! Still wish I knew precisely what the problem with their |
How could I investigate that? I could do some digging, but I don't On Fri, Dec 12, 2014 at 9:38 AM, Steven G. Johnson
|
Maybe put some print statements around the PyCall test that fails, to get more info? |
I think the PyCall test failure was spurious, and should be fixed in the latest PyCall version; can you try again after a |
FWIW, I'm having a very similar issue with Julia 0.3.7 and PyPlot 1.5.1:
I have Python 2.7.6, if that's relevant. |
@lkuper, not all errors in initializing matplotlib have the same origin, unfortunately. If we figure out a specific reason for yours it is likely to be a separate issue. That takes some digging to find out specifically what module import is failing, I'm afraid. For example, if you are using Ubuntu, I had a report recently that the Ubuntu Matplotlib is set up to support the GTK3 backend by default, but PyCall has not implemented the GTK3 event loops yet so it can't initialize properly for interactive use. You can try |
@stevengj, I see, thanks. Yes, this issue was on Ubuntu. FWIW, though,
|
Confirming this issue in the Ubuntu release of Julia, which I just installed yesterday on Ubuntu 14.04 according to the instructions on this page. Rather than building from source I am experimenting with Gadfly for my plotting needs, which so far seems to be working, although I miss a lot of the features of PyPlot. |
I think it should be straightforward to add gtk3 support to PyCall; I just don't have access to an Ubuntu machine at the moment. |
I use Julia on a Mac OS X, and I get the same error:
I've installed PyPlot with no problem, Pkg.test("PyCall") passed. |
@Iagoba, what happens if you |
@stevengj It works also just fine with one of the versions of python. More concretely the 3.4. I have also installed the 2.7 but no matplotlib for this.
|
Typing
Pkg.add("PyPlot")
using PyPlot
from julia 0.3.3 results in:
[[
Warning: error initializing module PyPlot:
PyCall.PyError(msg=":PyImport_ImportModule", T=PyCall.PyObject(o=0x0000000043382540), val=PyCall.PyObject(o=0x000000003f48dab8), traceback=PyCall.PyObject(o=0x000000003e91bef0))
]](delimiters [[ ]] added)
When trying to run
@pyimport matplotlib.pyplot as plt
The result is:
[[
ERROR: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('cannot import name scimath',)
File "/usr/lib64/python2.7/site-packages/matplotlib/init.py", line 179, in
from matplotlib.cbook import is_string_like
File "/usr/lib64/python2.7/site-packages/matplotlib/cbook.py", line 32, in
import numpy as np
File "/usr/lib64/python2.7/site-packages/numpy/init.py", line 170, in
from . import add_newdocs
File "/usr/lib64/python2.7/site-packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "/usr/lib64/python2.7/site-packages/numpy/lib/init.py", line 17, in
from . import scimath as emath
in pyerr_check at /home/jdgallag/.julia/v0.3/PyCall/src/exception.jl:58
in pyimport at /home/jdgallag/.julia/v0.3/PyCall/src/PyCall.jl:91
]]
What can be done?
The text was updated successfully, but these errors were encountered: