[vtk-developers] VTK/Python automatic pythonpath

Andy Cedilnik andy.cedilnik at kitware.com
Mon Dec 9 07:17:50 EST 2002


Hi Prabhu,

On Sat, 2002-12-07 at 09:06, Prabhu Ramachandran wrote:
> I just tested a few things.  It appears that vtkpython does solve the
> ValueError problem because it makes sure that if the build dir exists
> the Python modules (libvtk*Python*) are imported from the build dir.
> What happens I believe is that different copies of the module are
> loaded (because of the rpath settings) and the vtkPolyData object
> instantiated from the library in the build dir causes this trouble.
> Running the above with vtkpython does not trigger this error because
> it inserts the build dir in the path up front.  This means only the
> modules in the build dir are loaded.  I've even tested it with MayaVi
> (which is where most folks seem to encounter this problem).
> So in short, if one has a build dir and an install from that build
> vtkpython does solve the ValueError problem.  Using plain old python
> can trigger the ValueError if the build version of the library is in
> the path.

Cool. This is an unexpected plus.

> Yes, so long as you did not install VTK-Python using the setup.py
> script.  If you do that vtkpython works fine and finds the VTK modules
> from the installed place.
> 
> I'll update the README to this effect sometime.

Even better. How come?

			Andy




More information about the vtk-developers mailing list