[yt-users] Call for testing: VTK on Snow Leopard

Rick Wagner rwagner at physics.ucsd.edu
Tue Mar 16 11:28:06 PDT 2010


Hi Matt,

On Mar 16, 2010, at 10:11 AM, Matthew Turk wrote:

> Hi Rick,
> 
> Sam just immed me off list, and by importing libvtkRenderingPython he
> came up with a lack of the Qt libraries.  Evidently I forgot that I
> linked it against Qt -- my understanding is that this isn't strictly
> necessary because the render interactors inside TVTK hijack the window
> hints rather than embed inside Qt, but I could be wrong about that --
> in any event, Snow Leopard can only use Qt for the time being, as
> wxWidgets is Carbon-only.  Regardless, I'm going to try building
> again, but I assert that installing the Qt (4.6) libraries from here:
> 
> http://qt.nokia.com/downloads/mac-os-cpp
> 
> *should* provide the necessary libraries to link and run.  We're still
> testing, but as you can probably guess, it's hard to test the
> relocatable libraries!

You are correct! The only thing to watch out for is that the Qt site will try offer up the Carbon libraries, which I took the first time around. But, as you pointed out, we want the Cocoa ones [1], (qt-mac-cocoa-opensource).

With those in place, I have a cone to play with, which makes me happy.

> However, I am surprised it installed against the system python at all.
> I don't encourage others to try installing against that, as I have
> tried to be very careful with the specific architectures included in
> the Python distributed with the yt OSX10.6 installation script.  The
> necessary images in the build of VTK may not be sufficient for the
> "fat" build of Python that comes with 10.6, so you may very well get
> information that you are missing system images even with Qt installed.
> The simple test would be to do:
> 
> python2.6 -c "import vtk.libvtkRenderingPython"
> 
> on the command line, once you have Qt installed.  If it complains
> about missing system images, you will not be able to use my VTK build
> with the system Python.

I should have been clearer about what I mean by "system Python". I didn't mean the version that came with OS X 10.6, but rather the one that you created as part of the OS X 10.6 installation script. It installs into /System/Library/Frameworks, and the VTK Python wrappers wanted a Python 2.6 in that location, and weren't happy the 2.6 build I had only in /usr/local.

Looking closer at the dates to jog my memory, I built my version of Python on January 26 (the day I got my new laptop), because I was having trouble with the existing OS X install script. You'll note that you fixed this 2 weeks later with the 10.6 install. I had gotten everything I needed working, so I didn't test the new script.

So, no problems, I just wasn't being clear.

--Rick

> 
> -Matt
> 
> On Tue, Mar 16, 2010 at 9:45 AM, Rick Wagner <rwagner at physics.ucsd.edu> wrote:
>> Hi Matt,
>> 
>> Everything installs OK, provided the system version of Python 2.6 is used (FYI: I haven't been using this, because it was build for both PPC and i386, and I recall having trouble building other packages). But, anyways, I tried a couple of quick tests using the warped cone test [1] and simple cone example [2], and quickly tripped over some missing classes.
>> 
>> My initial hunting in the interpreter is below, and I've attached a list of all of the classes.
>> 
>> --Rick
>> 
>> [1] http://tinyurl.com/yc6yrry
>> [2] http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/Cone
>> 
>> 
>> namor:tmp rpwagner$ python
>> Python 2.6.4 (r264:75706, Feb  1 2010, 13:22:43)
>> [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import vtk
>>>>> vtk.__file__
>> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/vtk/__init__.pyc'
>>>>> ren = vtk.vtkRenderer()
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>> AttributeError: 'module' object has no attribute 'vtkRenderer'
>>>>> for i in dir(vtk):
>> ...     if i.find('Window') > -1:
>> ...             print i
>> ...
>> vtkFileOutputWindow
>> vtkImageMapToWindowLevelColors
>> vtkImplicitWindowFunction
>> vtkOutputWindow
>> vtkWindow
>> vtkWindowLevelLookupTable
>> vtkWindowedSincPolyDataFilter
>> vtkXMLFileOutputWindow
>>>>> for i in dir(vtk):
>> ...     if i.find('Render') > -1:
>> ...             print i
>> ...
>>>>> 
>> 
>> 
>> 
>> 
>> On Mar 16, 2010, at 8:22 AM, Matthew Turk wrote:
>> 
>>> Hi all,
>>> 
>>> I've constructed some packages of VTK on Snow Leopard.  If you've used
>>> the Snow Leopard installation script ("install_script_osx106.sh") to
>>> install yt and Python on your machine, I believe they should work --
>>> and I'd love to hear if they do or don't, as we'd really like to start
>>> moving the GUI over to the VTK/Matplotlib/Traits GUI that we've been
>>> working on for about a year.  This will enable a lot better
>>> interaction between you and your data, and we're going to be able to
>>> drop in support for things like OpenCL, OpenGL, and the volume
>>> renderer right inside that framework.  (An older, development
>>> screenshot of the new GUI:
>>> http://yt.enzotools.org/attachment/wiki/Screenshots/reason_v2.png --
>>> but things have improved since then!)
>>> 
>>> The process has been described on a Wiki page:
>>> 
>>> http://yt.enzotools.org/wiki/VTKOnSnowLeopard
>>> 
>>> so if you are interested, give it a go and let me know how it works for you.
>>> 
>>> Best,
>>> 
>>> Matt
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> 
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> 
>> 
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

[1] http://get.qt.nokia.com/qt/source/qt-mac-cocoa-opensource-4.6.2.dmg


More information about the yt-users mailing list