[vtkusers] vtk4 + python installation

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Mar 7 21:25:10 EST 2002


>>>>> "AG" == Alexandre Guimond <guimond at bwh.harvard.edu> writes:

    AG> Hi all.  after installing vtk4 (make install), I notice there
    AG> isn't any of the python stuff in the lib directory.  Looking
    AG> at VTK/CMakeLists.txt, I notice there is something to install
    AG> tcl wrappers:

    AG> IF (VTK_WRAP_TCL) SUBDIRS(Wrapping/Tcl) ENDIF (VTK_WRAP_TCL)

    AG> but nothing equivalent for the python stuff?  Is that correct?
    AG> Shouldn't the python stuff also be installed along with the
    AG> tcl wrapper?

Yes, that is currently an issue.  The problem with the Python stuff is
that it is a little complicated.  The usual way of installing Python
modules would be to put the modules into
$prefix/lib/pythonx.y/site-packages/vtkpython or something.  The
problem with this is that 

 (a) You need to know which version of Python is installed.  I haven't
 played with Cmake enough to find out how to do it.

 (b) If all the libvtk*Python.so libs are put in the site-packages
 directory you need to link them into a directory that is in the
 linkers path.

It is also possible not put the modules in the site-packages directory
and instead put it in $prefix/lib/vtk and then set a vtk.pth that
points to this directory.  I dont know if this would be any better.

An alternative approach might be to use distutils.  But distutils can
be a big pain for anything that is complicated.  So the final
possibility is to create a setup.py that does what we need.  However
doing this correctly for both win32 and *nix might be a problem but
should be workable.

If we can agree on some approach I can try and get this done sometime.
So, feedback/suggestions would be appreciated.

prabhu




More information about the vtkusers mailing list