[Pythonmac-SIG] Python VTK shared libraries

Bob Ippolito bob at redivi.com
Thu Jun 23 05:17:09 CEST 2005


On Jun 22, 2005, at 6:01 PM, Vladimir Shapovalov wrote:

> Recently I had to install Python interface for VTK. One of the
> problems I ran into was that the shared libraries built for VTK would
> not be seen by Python whatever path I put them into. The only way I
> found to make them visible was to make links in the site-pckages/
> vtk_python directory. In addition, the link to
> libvtkRenderingPythonTkWidgets.dylib had to be named
> libvtkRenderingPythonTkWidgets.so to make it work (otherwise python
> complained it could not find the .so file).
>
> Is there a more graceful solution to keeping the libraries in a more
> appropriate place and still having python find them?

The fact that they're installed to the wrong place and not linked or  
named correctly is a VTK problem.  Someone should fix it.  Obviously  
they're not leveraging distutils well enough, which takes care of  
these sorts of issues.

In order to add locations to Python's search path you should look  
into .pth files:
http://bob.pythonmac.org/archives/2005/02/06/using-pth-files-for- 
python-development/

-bob



More information about the Pythonmac-SIG mailing list