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

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Tue Sep 23 09:55:51 EDT 2003


Hi,

>>>>> "TB" == Tom Bridgman <bridgman at wyeth.gsfc.nasa.gov> writes:

[snip]

    TB> I can do a
    >> sudo make install
    TB> to make the package available system-wide, then generating the
    TB> python wrappers with
    >> sudo python setup.py install
    TB> in the Wrapping/Python directory.

    TB> It even seems to import vtk from regular python.

    TB> Now when I launch the same demo using the system-wide
    TB> executable, the window doesn't come to the forefront and is
    TB> downright unresponsive.  When I tried to install and use
    TB> MayaVi, I'd get segfaults.

    TB> Deleting the vtk components in /usr/local/bin and
    TB> /usr/local/lib resolves the problem.  I also noticed that if I
    TB> moved the source directory, vtkpython still seemed to want
    TB> dylib files in the source directory.

    TB> I suspect this is a path problem, but which paths?

AFAIK, vtkpython inserts the build directory into sys.path (look at
Wrapping/Python/vtkPythonAppInit.cxx), so moving the source directory
should not be a problem because if the libraries are not found in the
source directory it should pick the ones in the system directory.  So
this is surprising.  AFAIK, VTK is also built by default with
SKIP_RPATH set to OFF.  I have no idea if this is true for OS X
though.  This could be causing problems and you might want to set
CMAKE_SKIP_RPATH to ON.

    TB> Alternatively, should I have built the python wrappers
    TB> *before* doing 'make install'?  This step isn't so clear in

Yes, you should build VTK (and therefore the Python wrappers) before
you 'make install'.  You should run 'python setup.py install' *after*
you do a make install though.  BTW, did you read
Wrapping/Python/README.txt?


cheers,
prabhu



More information about the vtkusers mailing list