[vtkusers] Python and VTK under Linux

David Gobbi dgobbi at irus.rri.ca
Tue May 21 17:03:46 EDT 2002


Hi Brian,

It looks like the python header files that you compiled against
might not match the version of python that you are running.  Bring
CMakeCache.txt into a text editor and make sure that all the python
variables are pointing to the correct locations.
Also, make sure that BUILD_SHARED_LIBS:BOOL=ON

 - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On 21 May 2002, Brian White wrote:

> Hello all,
>
> I'm new to the VTK world so please bear with me if this is a newbie
> question.  I'm installing VTK on a Linux x86 running kernel 2.4.18,
> Python 2.2, Tcl and Tk 8.3.3.  I finally got it to build (there were a
> few false starts).  I am most interested in using the Python interface.
> When I try to run the demo program Cone.py located in
> Examples/Tutorial/Step1/Python I get the following error:
>
>
> Traceback (most recent call last):
>   File "Cone.py", line 9, in ?
>     from vtkpython import *
>   File "/src/vtk/v4.0/Wrapping/Python/vtkpython.py", line 29, in ?
>     exec "from "+kit_name+" import *"
>   File "<string>", line 1, in ?
> ImportError: /usr/local/lib/vtk/libvtkCommonPython.so: undefined symbol:
> PyType_IsSubtype
>
>
> When I run "nm" on the .so reported sure enough that symbol is listed as
> undefined. Has anyone else run into this problem?  Am I configuring
> before the build incorrectly somehow?
>
> Thanks in advance for any help that you can give.  I will summarize the
> results once they're in.
>
> Thanks again.
>
> Brian White
> Altarum Institute
> Ann Arbor, MI
>




More information about the vtkusers mailing list