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
GTK error, failed building on command line #1939
Conversation
Could you provide some more info @janrito? Specifically the relevant details from http://matplotlib.org/faq/troubleshooting_faq.html#getting-help. Cheers, |
I am experiencing the same problem trying to install matplotlib with pip. I'm running Ubuntu Quantal. Here's the output of uname -a:
I can't provide any other debugging information suggested in the FAQ because matplotlib is not installed. At first I thought this was happening because I was running the command inside screen, but it also fails in a fresh terminal from which I can launch GUI apps successfully. The line numbers in my error message are different. Here is the full error output from my terminal:
Downloading/unpacking matplotlib
Running setup.py egg_info for package matplotlib
============================================================================
Edit setup.cfg to change the build options
|
Sorry, I forgot about this ticket. The latest 1.3 version suffers of the same issue. It cannot be installed in a headless server. $ uname -a
No changes to setup.py, and I doubt matplotlibrc is affecting the install but here it is:
$ gcc --version
$ python setup.py build
|
Interesting. I think I see what the problem is, but I can't seem to reproduce it on my Fedora 19 (with X11 forwarding unavailable). I think what's happening is that with your version of pygobject, initalizing Gtk without X11 fails, whereas on mine it doesn't. Can you please try running the following on your system, but with and without X11, and send me the results?
|
without X11 forwarding:
with X11 forwarding:
|
Aha! So the X11 forwarding is a red herring, I think. I think your machine is in a surprising state of having This isn't a hard requirement of matplotlib, and the intention is that the build should continue without it, however, we need to update our script to handle a |
… for gtk, it throws a RuntimeError, not an ImportError, and we need to catch that.
Can you confirm the attached patch fixes the issue? |
Great! Building succeeds. It does give me these warnings:
Also, I do have
|
GTK error, failed building on command line
My guess is that the build script is trying to initialise X11 over the terminal, and failing. This only happens in the dev branch.