[vtkusers] VTK & Python on MacOS X: Local vs. system installation]
Tom Bridgman
bridgman at wyeth.gsfc.nasa.gov
Tue Sep 23 12:09:24 EDT 2003
Prabhu Ramachandran wrote:
>
> 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.
I don't recall the prompt for this in 'cmake -i' but I check that if the
problem persists.
> 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?
Yes. I chose option (3) in that discussion. Since I wasn't getting the
specific error mentioned under 'Common Problems', the description didn't
quite register so I didn't check the CMAKE_SKIP_RPATH setting.
I'm now doing a build on my work machine (where I don't have root but
have some sudo so hopefully I can complete the process).
I'm trying to summarize all my settings and steps so I can make it
available on this and the MacPython list, hopefully with some feedback.
VTK and MayaVi are fantastic tools when you can get them working but it
really does take someone with more *nix experience than I have to
navigate some of the problems.
Thanks,
Tom
--
Dr. William T."Tom" Bridgman Scientific Visualization Studio
Global Science & Technology, Inc. NASA/Goddard Space Flight Center
Email: bridgman at wyeth.gsfc.nasa.gov Code 935
Phone: 301-286-1346 Greenbelt, MD 20771
FAX: TBD http://svs.gsfc.nasa.gov/
More information about the vtkusers
mailing list