@Andrew: I do, in fact, have tcl/tk installed on my machine - version 8.5.2 in /usr/lib64 - so I'm not entirely sure why the version of matplotlib in the yt distribution couldn't find it.  I have used Tkinter with my current Python installation.  Maybe it would be better to try to build by hand and point to all the individual pieces.<br>
<br>@Matt: Thanks for the history behind the toolkit choices.  The HTML GUI sounds interesting and I look forward to seeing how it turns out.<br><br>Chris<br><br><div class="gmail_quote">On Mon, Dec 6, 2010 at 5:29 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br>
<br>
Sorry to chime in after all the activity is dead, but I believe Andrew<br>
is completely correct -- this is just another symptom of how providing<br>
cross-platform, cross-toolkit GUIs is a difficult (even broken)<br>
process, and Agg is the only really reliable plotting solution.  The<br>
availability of GTK, Qt, Tk and so forth, let alone the wrappers on<br>
top of those underlying toolkits, is not guaranteed, and installing<br>
these platforms along with their long list of dependencies is not an<br>
easy task for an isolated installation script.  (This is why tools<br>
like VisIt and ParaView typically spend so much time on packaging!)<br>
<br>
Once upon a time in the west we tried supplying wxPython with yt,<br>
which would enable the usage of the wxAgg backend for Matplotlib, but<br>
it became too burdensome to maintain, and it never worked properly.<br>
Having now written several GUIs for yt, none of which really worked in<br>
the long run, I personally believe that there's only really one way<br>
forward with the current state of the technology.  This is going to be<br>
a combination of a webserver tunneled over ssh and local display (in a<br>
web browser) of a standard Python prompt with the ability to create<br>
small widgets for data exploration.  Maintaining a large GUI that<br>
lives on top of the scripting interface is a difficult problem, and I<br>
think it's unreasonable to expect it to be both maintainable and<br>
complete.<br>
<br>
I've built a couple prototypes of a purely HTML GUI, but I don't<br>
expect to be able to roll these into the main distribution until<br>
sometime in the early part of next year.  The idea would be that you<br>
open an ssh tunnel to a remote machine, you hit your local port and<br>
your web browser talks to yt.  Within this you'd be able to access the<br>
scripting interface and spawn individual widgets for things like image<br>
panning, volume rendering, editing transfer functions and so on, and<br>
then view the results directly in the browser without having to<br>
forward toolkit-displayed graphics through an X11 session.  This seems<br>
to me to be the only mechanism we can guarantee a user interface<br>
experience that doesn't rely on remote systems having a set of<br>
dependencies that are frankly quite uncommon at most supercomputer<br>
deployments.  In this model, the UI would be very small, require no<br>
compile-time dependencies, and could be *much* more easily maintained.<br>
<br>
Anyway, sorry about the rant, and I'm very sorry that the standard iyt<br>
interactive plotting did not work -- but your concerns aren't falling<br>
on deaf ears, and hopefully in the medium-future we can roll something<br>
out that will work for interactive, exploratory analysis without<br>
adding any installation complexity.<br>
<br>
If anybody wants to help out with this, beta test, or has experience<br>
with JavaScript/HTML/ExtJS/AJAX, I'd be *really* eager to chat with<br>
you.  I've got a public hg repo with my initial attempts in it which<br>
I'm also happy to share.  Email me off-list and I'll send the URL and<br>
some info on how to start out.<br>
<br>
Best wishes,<br>
<br>
Matt<br>
<div><div></div><div class="h5"><br>
On Mon, Dec 6, 2010 at 1:59 PM, Andrew Myers <<a href="mailto:atmyers@berkeley.edu">atmyers@berkeley.edu</a>> wrote:<br>
> Hi Chris,<br>
><br>
> I've seen this before when trying to build yt on my machine. If the<br>
> matplotlib installer can't find tcl/tk on your machine, it won't be able to<br>
> build Tkinter. You'll need to install tcl/tk and re-run the yt install<br>
> script.<br>
><br>
> You should be able to use yt with the 'Agg' backend even if you don't do<br>
> this. You won't be able to view figures interactively, but you will be able<br>
> to save .png files to look at later. This is probably the default backend,<br>
> which is why moving the matplotlibrc file allowed you to start iyt.<br>
><br>
> Andrew Myers<br>
><br>
> On Mon, Dec 6, 2010 at 1:13 PM, Chris Malone <<a href="mailto:chris.m.malone@gmail.com">chris.m.malone@gmail.com</a>><br>
> wrote:<br>
>><br>
>> A followup:<br>
>><br>
>> I tried the install script on a different machine and it installed fine.<br>
>> I then went back to my original machine and mv'ed the<br>
>> ~/.matplotlib/matplotlibrc file out of the way and the ipython session<br>
>> started properly with iyt.<br>
>><br>
>> So something in my matplibrc file is causing the crash, but the only<br>
>> warning I received was that the numerix param was obsolete.  I tried just<br>
>> commenting out that particular line in the matplotlibrc file but I still<br>
>> recieve the same errors as before.  Any ideas what else in the matplotlibrc<br>
>> file could be causing the crash?<br>
>><br>
>> Chris<br>
>><br>
>> On Mon, Dec 6, 2010 at 3:46 PM, Chris Malone <<a href="mailto:chris.m.malone@gmail.com">chris.m.malone@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Hi Jeff,<br>
>>><br>
>>> Thanks for the quick response.  Changing this in my<br>
>>> ~/.matplotlib/matplotlibrc file results in:<br>
>>> $ iyt<br>
>>><br>
>>> /home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/matplotlib/rcsetup.py:117:<br>
>>> UserWarning: rcParams key "numerix" is obsolete and has no effect;<br>
>>>  please delete it from your matplotlibrc file<br>
>>>   warnings.warn('rcParams key "numerix" is obsolete and has no effect;\n'<br>
>>> Traceback (most recent call last):<br>
>>>   File "/home/cmalone/install/yt/yt-x86_64/bin/iyt", line 7, in <module><br>
>>>     execfile(__file__)<br>
>>>   File "/home/cmalone/install/yt/yt-x86_64/src/yt-hg/scripts/iyt", line<br>
>>> 32, in <module><br>
>>>     ip_shell = IPython.Shell.IPShellMatplotlib(user_ns=namespace)<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/IPython/Shell.py",<br>
>>> line 1106, in __init__<br>
>>>     shell_class=MatplotlibShell)<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/IPython/Shell.py",<br>
>>> line 73, in __init__<br>
>>>     debug=debug,shell_class=shell_class)<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/IPython/ipmaker.py",<br>
>>> line 100, in make_IPython<br>
>>>     embedded=embedded,**kw)<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/IPython/Shell.py",<br>
>>> line 627, in __init__<br>
>>>     user_ns,user_global_ns,b2 =<br>
>>> self._matplotlib_config(name,user_ns,user_global_ns)<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/IPython/Shell.py",<br>
>>> line 556, in _matplotlib_config<br>
>>>     import matplotlib.pylab as pylab<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/matplotlib/pylab.py",<br>
>>> line 259, in <module><br>
>>>     from matplotlib.pyplot import *<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/matplotlib/pyplot.py",<br>
>>> line 95, in <module><br>
>>>     new_figure_manager, draw_if_interactive, show = pylab_setup()<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/matplotlib/backends/__init__.py",<br>
>>> line 25, in pylab_setup<br>
>>>     globals(),locals(),[backend_name])<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py",<br>
>>> line 8, in <module><br>
>>>     import Tkinter as Tk, FileDialog<br>
>>>   File<br>
>>> "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/lib-tk/Tkinter.py", line<br>
>>> 39, in <module><br>
>>>     import _tkinter # If this fails your Python may not be configured for<br>
>>> Tk<br>
>>> ImportError: No module named _tkinter<br>
>>><br>
>>> The install script that I attached before listed "no" for the Tkinter,<br>
>>> wxPython and Gtk+ OPTIONAL BACKEND DEPENDENCIES when trying to build<br>
>>> matplotlib.<br>
>>><br>
>>> Chris<br>
>>><br>
>>><br>
>>> On Mon, Dec 6, 2010 at 3:17 PM, j s oishi <<a href="mailto:jsoishi@gmail.com">jsoishi@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi Chris,<br>
>>>><br>
>>>> Could you try switching the backend in your .matplotlibrc file to<br>
>>>> TkAgg? yt may not install all the GUI backends matplotlib can support,<br>
>>>> but it should work with TkAgg straight out of the box.<br>
>>>><br>
>>>> thanks,<br>
>>>><br>
>>>> jeff<br>
>>>><br>
>>>> On Mon, Dec 6, 2010 at 11:52 AM, Chris Malone <<a href="mailto:chris.m.malone@gmail.com">chris.m.malone@gmail.com</a>><br>
>>>> wrote:<br>
>>>> > Hi,<br>
>>>> ><br>
>>>> > Im running on a Fedora 9, 64-bit local desktop:<br>
>>>> ><br>
>>>> > $ uname -r 2.6.27.25-78.2.56.fc9.x86_64<br>
>>>> ><br>
>>>> > I used the install script for both the current stable release as well<br>
>>>> > as the<br>
>>>> > development release.  Both scripts completed without any errors.  I<br>
>>>> > wanted<br>
>>>> > to try the Quick Start instructions to play with the iyt interface.<br>
>>>> > Below<br>
>>>> > is what happens for both cases (after prepending the appropriate<br>
>>>> > environment<br>
>>>> > variables):<br>
>>>> ><br>
>>>> > $ iyt<br>
>>>> ><br>
>>>> > /home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/matplotlib/rcsetup.py:117:<br>
>>>> > UserWarning: rcParams key "numerix" is obsolete and has no effect;<br>
>>>> >  please delete it from your matplotlibrc file<br>
>>>> >   warnings.warn('rcParams key "numerix" is obsolete and has no<br>
>>>> > effect;\n'<br>
>>>> > Traceback (most recent call last):<br>
>>>> >   File "/home/cmalone/install/yt/yt-x86_64/bin/iyt", line 7, in<br>
>>>> > <module><br>
>>>> >     execfile(__file__)<br>
>>>> >   File "/home/cmalone/install/yt/yt-x86_64/src/yt-hg/scripts/iyt",<br>
>>>> > line 30,<br>
>>>> > in <module><br>
>>>> >     ip_shell = ipbackends[bend](user_ns=namespace)<br>
>>>> >   File<br>
>>>> ><br>
>>>> > "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/IPython/Shell.py",<br>
>>>> > line 1116, in __init__<br>
>>>> >     shell_class=MatplotlibMTShell)<br>
>>>> >   File<br>
>>>> ><br>
>>>> > "/home/cmalone/install/yt/yt-x86_64/lib/python2.6/site-packages/IPython/Shell.py",<br>
>>>> > line 775, in __init__<br>
>>>> >     import gtk<br>
>>>> > ImportError: No module named gtk<br>
>>>> ><br>
>>>> ><br>
>>>> > It therefore appears (and see example install log below) that pygtk<br>
>>>> > was not<br>
>>>> > installed or detected.  Is this working as intended, such that the<br>
>>>> > install<br>
>>>> > script doesn't include the GUI backend information?  Or is is<br>
>>>> > something on<br>
>>>> > my end that is not working properly?  The install script mentions if<br>
>>>> > you<br>
>>>> > have problems with wxPython you should set INST_WXPYTHON=0, but I<br>
>>>> > don't see<br>
>>>> > anything specific about Gtk and I didn't have any wxPython issues<br>
>>>> > other than<br>
>>>> > the installer not finding it when trying to install matplotlib (again<br>
>>>> > see<br>
>>>> > install log).<br>
>>>> ><br>
>>>> > In other words, it appears that the install script isn't completely<br>
>>>> > creating<br>
>>>> > a "fully isolated Python installation with the dependencies you need<br>
>>>> > to run<br>
>>>> > yt," unless there are some options I need to pass to matplotlib via<br>
>>>> > the<br>
>>>> > MPL_SUPP_* flags?<br>
>>>> ><br>
>>>> > If it helps at all, I do have a Python 2.5.1 global installation,<br>
>>>> > which has<br>
>>>> > access to matplotlib, NumPy, wxPython, Tkinter, and Gtk.  Would it be<br>
>>>> > easier<br>
>>>> > to install by hand and just point to the appropriate locations of<br>
>>>> > these<br>
>>>> > libraries?  If so, which versions of HDF5, NumPy, Matplotlib and<br>
>>>> > wxPython<br>
>>>> > are required? (only versions of Python are specified at<br>
>>>> > <a href="http://yt.enzotools.org/doc/installation.html#installing-by-hand" target="_blank">http://yt.enzotools.org/doc/installation.html#installing-by-hand</a><br>
>>>> ><br>
>>>> ><br>
>>>> > -------------- yt_install.log attached ----------------<br>
>>>> ><br>
>>>> > Chris<br>
>>>> ><br>
>>>> > _______________________________________________<br>
>>>> > yt-users mailing list<br>
>>>> > <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>> > <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>> ><br>
>>>> ><br>
>>>> _______________________________________________<br>
>>>> yt-users mailing list<br>
>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br>