[vtkusers] problems with python and cvs vtk
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Tue Jul 30 22:33:50 EDT 2002
>>>>> "MH" == Magnus Hagdorn <Magnus.Hagdorn at glg.ed.ac.uk> writes:
>> Another common reasion is when the VTK libraries appear more
>> than once in your LD_LIBRARY_PATH. Please check on this.
>>
MH> cheers again for your reply. i think something is not right
MH> when using setup.py for installing python modules. i solved
MH> the problem by pointing the pythonpath to:
MH> /usr/local/VTK/Wrapping/Python:/usr/local/VTK/bin
I'm the one to blame for the setup.py. The script has hardly been
tested. I've tested it myself under Debian GNU/Linux and someone else
tested it under Win32. Thats about it. Anyway, the way you are
supposed to use setup.py is that you first do a make install of VTK.
After the make install you should run the setup.py script. Hopefully,
someday, we will integrate the setup.py into the make install process
but for now you will have to do it manually.
Under *nix, the way the setup.py works is that it copies all the *.py
files from inside the directory and puts them in
sys.prefix/lib/sys.version[:3]/site-packages/vtk_python and then
creates a vtk.pth inside the site-packages directory that points to
this directory. Additionally it creates symbolic links from the
vtk_python directory to the place where the libvtk*Python.so's are
installed (which is why the make install step is important). This
eliminates the need to change the PYTHONPATH. All you need to have is
the libvtk*.so in your LD_LIBRARY_PATH (either via ld.so.conf or via
the env variable).
Under Win32 the way it works is similar but does not require the
symlinks.
Could you do the make install and then run python setup.py from inside
Wrapping/Python and tell us how it goes? We can try to iron out any
bugs in the script.
One point to note, please remember that when you have multiple
versions of Python installed (1.5.2 and 2.1 etc.) then use the
appropriate interpreter. Also, remember that multiple copies of the
same libvtk*Python.so files in your LD_LIBRARY_PATH can cause
considerable heartache.
cheers,
prabhu
More information about the vtkusers
mailing list