dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #14434
Re: question about VTK and Python
> Hello, again.
>
> I have realized that I cannot import VTK into python completely. I get
> the same error I was getting before (listed below). Does anyone here have
> any experience with installing VTK and getting it to work with Python? I
> am probably missing something dumb.
>
> - Shawn
>
> walker@box227 ~/build/lib/vtk-5.3
> $ python
> Python 2.5.2 (r252:60911, Aug 7 2008, 15:50:01)
> [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import vtk
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/walker/build/lib/python2.5/site-packages/vtk/__init__.py",
> line 41, in <module>
> from common import *
> File "/home/walker/build/lib/python2.5/site-packages/vtk/common.py",
> line 7, in <module>
> from libvtkCommonPython import *
> ImportError: /home/walker/build/lib/vtk-5.3/libvtkCommonPythonD.so.5.3:
> undefined symbol: Py_InitModule4
>>>>
>
I think you have some inconsistency in the python version that you are using
and the libraries that you are using (ie the libraries have been compiled
against another python version) . I think Py_InitModule4 is some internal
function in Python (though I have not gone through the Python source code
to check)
Kent
Follow ups
References