[vtkusers] VTK & Python on MacOS X: Local vs. system installation]

Yves Starreveld ystarrev at uwo.ca
Tue Sep 23 08:41:27 EDT 2003


Tom,

Glad to almost hear everything works.

OSX is a little different (as I'm sure you have surmised).

In order for an application to receive events from the window manager, 
it must be registered with the window manager. The only two ways for 
that to happen are with an obscure, undocumented system call, or to run 
the application from an 'App wrapper' which has an appropriate 
Info.plist file within it.

This is why you need to use Python2.3, since it comes with a simple 
solution for this.

Instead of typing python (or vtkpython), use pythonw.

If you did a binary install of python2.3, pythonw will have been 
installed also. It is simply a script that calls an executable python 
which is installed in an app wrapper.

Your vtk application will run, and you can interact with it. (you _did_ 
get a 3 button mouse, I hope!)

Yves

On Tuesday, September 23, 2003, at 08:32  AM, Tom Bridgman wrote:

> Thanks to some feedback and a header file update from Yves, I finally
> got VTK to build under OS X 10.2.6 with the python wrappers.
>
> However, when running the wrappers in the source directory, say VTK/, I
> can get the python demos to run with commands like:
>
>> ./bin/vtkpython Examples/Rendering/Python/Medical3.py
>
> The dataset works beautifully, with 'vtkX - Carbon #1' in the title 
> bar.
>
> I can do a
>> sudo make install
> to make the package available system-wide, then generating the python
> wrappers with
>> sudo python setup.py install
> in the Wrapping/Python directory.
>
> It even seems to import vtk from regular python.
>
> Now when I launch the same demo using the system-wide executable, the
> window doesn't come to the forefront and is downright unresponsive.
> When I tried to install and use MayaVi, I'd get segfaults.
>
> Deleting the vtk components in /usr/local/bin and /usr/local/lib
> resolves the problem.  I also noticed that if I moved the source
> directory, vtkpython still seemed to want dylib files in the source
> directory.
>
> I suspect this is a path problem, but which paths?  Alternatively,
> should I have built the python wrappers *before* doing 'make install'?
> This step isn't so clear in the README.html.  I'm *so close* to getting
> MayaVi running on this system!
>
> Thanks,
> Tom
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: 
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list