Hello,
Suddenly my yt distribution seems to be broken because it cannot find the module sip. Sip appears to be a python/C interface that is called by matplotlib.pyplot. I have tried a few things to resolve the issue, none of which have worked. I've tried: yt update --all, pip install sip, and apt-get install yt using the repository mentioned on the Get YT page. pip install and apt-get install fail for separate reasons, which I can explain in a future email if necessary.
Since first encountering this problem, I have updated my OS because I realized I was using an outdated version of Ubuntu. I am now running Ubuntu 12.4 LTS. The OS update did not resolve the issue.
It seems worth mentioning that the default system python distribution is working fine and I am able to import pyplot as well as sip without a problem. During a quick search of the yt distribution, I did not find the same sip related files that I have in my system's python distribution.
Also, as of Friday, things are working fine with the yt distribution I have on my Mac laptop.
Thanks very much in advance for your help. Please let me know if you would like me to post some of the error messages I have received from the few solutions that I've tried.
Gary
Hi Gary,
I don't think I've seen this before.
Can you paste the a small script that triggers this, along with the full traceback you get when the script errors out?
Cheers
Nathan
On Monday, September 2, 2013, Gary Foreman wrote:
Hello,
Suddenly my yt distribution seems to be broken because it cannot find the module sip. Sip appears to be a python/C interface that is called by matplotlib.pyplot. I have tried a few things to resolve the issue, none of which have worked. I've tried: yt update --all, pip install sip, and apt-get install yt using the repository mentioned on the Get YT page. pip install and apt-get install fail for separate reasons, which I can explain in a future email if necessary.
Since first encountering this problem, I have updated my OS because I realized I was using an outdated version of Ubuntu. I am now running Ubuntu 12.4 LTS. The OS update did not resolve the issue.
It seems worth mentioning that the default system python distribution is working fine and I am able to import pyplot as well as sip without a problem. During a quick search of the yt distribution, I did not find the same sip related files that I have in my system's python distribution.
Also, as of Friday, things are working fine with the yt distribution I have on my Mac laptop.
Thanks very much in advance for your help. Please let me know if you would like me to post some of the error messages I have received from the few solutions that I've tried.
Gary
Hi Nathan,
Simply trying to run iyt produces the error. Here's a link with the error output I'm receiving http://pastebin.com/j11nKn58
Thanks for your help, Gary
On Tue, Sep 3, 2013 at 11:25 AM, Nathan Goldbaum nathan12343@gmail.comwrote:
Hi Gary,
I don't think I've seen this before.
Can you paste the a small script that triggers this, along with the full traceback you get when the script errors out?
Cheers
Nathan
On Monday, September 2, 2013, Gary Foreman wrote:
Hello,
Suddenly my yt distribution seems to be broken because it cannot find the module sip. Sip appears to be a python/C interface that is called by matplotlib.pyplot. I have tried a few things to resolve the issue, none of which have worked. I've tried: yt update --all, pip install sip, and apt-get install yt using the repository mentioned on the Get YT page. pip install and apt-get install fail for separate reasons, which I can explain in a future email if necessary.
Since first encountering this problem, I have updated my OS because I realized I was using an outdated version of Ubuntu. I am now running Ubuntu 12.4 LTS. The OS update did not resolve the issue.
It seems worth mentioning that the default system python distribution is working fine and I am able to import pyplot as well as sip without a problem. During a quick search of the yt distribution, I did not find the same sip related files that I have in my system's python distribution.
Also, as of Friday, things are working fine with the yt distribution I have on my Mac laptop.
Thanks very much in advance for your help. Please let me know if you would like me to post some of the error messages I have received from the few solutions that I've tried.
Gary
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
The specific error you're seeing is from not having PyQT installed. This package is the python bindings for the qt graphics library. I'm a little puzzled that the matplotlib installer will default to the QTAgg backend when a system does not have PyQT installed, but it looks like this is the way it is.
I could see two ways to fix this. Firs, you could try installing PyQT:
sudo apt-get install python-qt4
That should also install the SIP module and satisfy the ImportError you're seeing. There might be more packages you'll need after that so there might be further ImportErrors.
You could also try switching your matplotlib backend. You'll need to create a file named .matplotlibrc in your home folder (if it doesn't already exist), and add a line that looks like this:
backend : TkAgg
For more detail about matplotlib's configuration section, take a look at this: http://matplotlib.org/users/customizing.html
Cheers,
Nathan
On Tue, Sep 3, 2013 at 9:43 AM, Gary Foreman gforema2@illinois.edu wrote:
Hi Nathan,
Simply trying to run iyt produces the error. Here's a link with the error output I'm receiving http://pastebin.com/j11nKn58
Thanks for your help, Gary
On Tue, Sep 3, 2013 at 11:25 AM, Nathan Goldbaum nathan12343@gmail.comwrote:
Hi Gary,
I don't think I've seen this before.
Can you paste the a small script that triggers this, along with the full traceback you get when the script errors out?
Cheers
Nathan
On Monday, September 2, 2013, Gary Foreman wrote:
Hello,
Suddenly my yt distribution seems to be broken because it cannot find the module sip. Sip appears to be a python/C interface that is called by matplotlib.pyplot. I have tried a few things to resolve the issue, none of which have worked. I've tried: yt update --all, pip install sip, and apt-get install yt using the repository mentioned on the Get YT page. pip install and apt-get install fail for separate reasons, which I can explain in a future email if necessary.
Since first encountering this problem, I have updated my OS because I realized I was using an outdated version of Ubuntu. I am now running Ubuntu 12.4 LTS. The OS update did not resolve the issue.
It seems worth mentioning that the default system python distribution is working fine and I am able to import pyplot as well as sip without a problem. During a quick search of the yt distribution, I did not find the same sip related files that I have in my system's python distribution.
Also, as of Friday, things are working fine with the yt distribution I have on my Mac laptop.
Thanks very much in advance for your help. Please let me know if you would like me to post some of the error messages I have received from the few solutions that I've tried.
Gary
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Gary,
Sorry about the troubles! Nathan's definitely provided some good suggestions; let's see if we can figure out what's up. I have some questions and ideas.
On Mon, Sep 2, 2013 at 5:32 PM, Gary Foreman gforema2@illinois.edu wrote:
Hello,
Suddenly my yt distribution seems to be broken because it cannot find the module sip. Sip appears to be a python/C interface that is called by matplotlib.pyplot. I have tried a few things to resolve the issue, none of which have worked. I've tried: yt update --all, pip install sip, and apt-get install yt using the repository mentioned on the Get YT page. pip install and apt-get install fail for separate reasons, which I can explain in a future email if necessary.
Since first encountering this problem, I have updated my OS because I realized I was using an outdated version of Ubuntu. I am now running Ubuntu 12.4 LTS. The OS update did not resolve the issue.
I think the best bet, right now, is *just* the install_script.sh method for Ubuntu.
It seems worth mentioning that the default system python distribution is working fine and I am able to import pyplot as well as sip without a problem. During a quick search of the yt distribution, I did not find the same sip related files that I have in my system's python distribution.
Also, as of Friday, things are working fine with the yt distribution I have on my Mac laptop.
That's good to hear! :)
Thanks very much in advance for your help. Please let me know if you would like me to post some of the error messages I have received from the few solutions that I've tried.
Here's what I suspect is going on. A recent change to Matplotlib modifies the type of backend that is selected by default for pyplot. We've seen issues crop up on OSX recently from this change as well, where the python installed is not built in such a way as to enable the given frontend. On Linux, this would manifest as not being able to access Qt -- the backend in particular is PyQt4, and it depends on SIP, which as you and Nathan noted is a mechanism for interfacing C++ and Python code.
Unfortunately, the problems run a bit deeper, in that yt's base install builds a Python that is distinct from the system's python, and so binary modules may not work across those two. This further causes problems because the Qt python wrappings will have to be built against *yt's* python, and then that just builds an enormous stack of dependencies that's tough to resolve. Typically what we do is simply not enable the PyQt4 backend. One issue with the backend selection process is that it is often fatal; rather than defaulting to a backend that works, the matplotlib/pyplot interface just fails out.
What I would suggest as a broad strategy is: do not attempt to get the yt python and system python to work together, and don't try to get the PyQt4 bindings that are apt-get-able to work with the yt-installed Python -- it's just going to dig deeper and deeper. Instead, turn off the PyQt4 backend and use Agg, similar to how Nathan suggested, but switching "TkAgg" for "Agg".
But, this also means no interactive pyplot sessions. This is an enormous problem, and unfortunately getting everything to play nicely is somewhat difficult for us as a (relatively) small project to manage. What we are attempting to do is instead step aside the packaging issue and *stop* attempting to create a full yt stack. Our first discussion of this was on yt-dev the other day:
http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/2013-August/003386...
So, short term: switch the backend to Agg, which should fix things from that perspective but won't give interactive plotting widgets. Longer term, we are going to clean up the yt house to play much, much nicer with both distributions (like Ubuntu) and with python distributions (like Conda/Anaconda) to keep this from happening in the future and to make way more functionality available.
Let me know if that fix works!
-Matt
Gary
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Matt and Nathan,
Thanks very much for helping me so quickly!
Matt, your suggestion to use backend : Agg did the trick. At this point both iyt and the script I was using when I first encountered the error are working fine. So it sounds like if I'd like to use pyplot interactively, I'll have to do so outside of yt and change my matplotlib backend back to qt4agg, but that won't be a big deal now that I know what I'm doing :)
Gary
On Tue, Sep 3, 2013 at 12:20 PM, Matthew Turk matthewturk@gmail.com wrote:
Hi Gary,
Sorry about the troubles! Nathan's definitely provided some good suggestions; let's see if we can figure out what's up. I have some questions and ideas.
On Mon, Sep 2, 2013 at 5:32 PM, Gary Foreman gforema2@illinois.edu wrote:
Hello,
Suddenly my yt distribution seems to be broken because it cannot find the module sip. Sip appears to be a python/C interface that is called by matplotlib.pyplot. I have tried a few things to resolve the issue, none
of
which have worked. I've tried: yt update --all, pip install sip, and
apt-get
install yt using the repository mentioned on the Get YT page. pip install and apt-get install fail for separate reasons, which I can explain in a future email if necessary.
Since first encountering this problem, I have updated my OS because I realized I was using an outdated version of Ubuntu. I am now running
Ubuntu
12.4 LTS. The OS update did not resolve the issue.
I think the best bet, right now, is *just* the install_script.sh method for Ubuntu.
It seems worth mentioning that the default system python distribution is working fine and I am able to import pyplot as well as sip without a problem. During a quick search of the yt distribution, I did not find the same sip related files that I have in my system's python distribution.
Also, as of Friday, things are working fine with the yt distribution I
have
on my Mac laptop.
That's good to hear! :)
Thanks very much in advance for your help. Please let me know if you
would
like me to post some of the error messages I have received from the few solutions that I've tried.
Here's what I suspect is going on. A recent change to Matplotlib modifies the type of backend that is selected by default for pyplot. We've seen issues crop up on OSX recently from this change as well, where the python installed is not built in such a way as to enable the given frontend. On Linux, this would manifest as not being able to access Qt -- the backend in particular is PyQt4, and it depends on SIP, which as you and Nathan noted is a mechanism for interfacing C++ and Python code.
Unfortunately, the problems run a bit deeper, in that yt's base install builds a Python that is distinct from the system's python, and so binary modules may not work across those two. This further causes problems because the Qt python wrappings will have to be built against *yt's* python, and then that just builds an enormous stack of dependencies that's tough to resolve. Typically what we do is simply not enable the PyQt4 backend. One issue with the backend selection process is that it is often fatal; rather than defaulting to a backend that works, the matplotlib/pyplot interface just fails out.
What I would suggest as a broad strategy is: do not attempt to get the yt python and system python to work together, and don't try to get the PyQt4 bindings that are apt-get-able to work with the yt-installed Python -- it's just going to dig deeper and deeper. Instead, turn off the PyQt4 backend and use Agg, similar to how Nathan suggested, but switching "TkAgg" for "Agg".
But, this also means no interactive pyplot sessions. This is an enormous problem, and unfortunately getting everything to play nicely is somewhat difficult for us as a (relatively) small project to manage. What we are attempting to do is instead step aside the packaging issue and *stop* attempting to create a full yt stack. Our first discussion of this was on yt-dev the other day:
http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/2013-August/003386...
So, short term: switch the backend to Agg, which should fix things from that perspective but won't give interactive plotting widgets. Longer term, we are going to clean up the yt house to play much, much nicer with both distributions (like Ubuntu) and with python distributions (like Conda/Anaconda) to keep this from happening in the future and to make way more functionality available.
Let me know if that fix works!
-Matt
Gary
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org