[vtkusers] VTK Python Wrapper and OS X

Dr. Daniel James White PhD dan at chalkie.org.uk
Thu Dec 18 10:07:35 EST 2003


Hi,

I am using vtk  on os X 10.2 and 10.3 (built on 10.2) recent CVS
cmake from kitware (why get it anywhere else?)
with MacPython (different for 10.2 and 10.3 as panther contains the 
python engine already, but not the extra bits)
and AquaTckTk Batteries included 8.4 most recent.

I am running the python vtk frontend MayaVi, using native aqua 
interface on OSX
but I have to run it from the VTK/bin
directory or the compiled binaries are not found, even after
make install.

maybe you are seeing something similar.

Dan

On 18 Dec 2003, at 13:25, vtkusers-request at vtk.org wrote:

> -__--__--
>
> Message: 3
> Date: Wed, 17 Dec 2003 10:06:17 -0800
> From: Jeremy Guralnick <jg at tachyon.net>
> To: <vtkusers at vtk.org>
> Subject: [vtkusers] VTK Python Wrapper and OS X
>
> I've been trying to get the python wrapper to work under OS X (10.2.8)
> without success. Whether I use python or vtkpython I get the following
> error:
>
> Python 2.2.2 (#1, 01/12/03, 07:51:34)
> [GCC Apple cpp-precomp 6.14] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import vtk
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File 
> "/Users/jg/Tachyon/Develop/VTK/Wrapping/Python/vtk/__init__.py", line
> 7, in ?
>     from common import *
>   File "/Users/jg/Tachyon/Develop/VTK/Wrapping/Python/vtk/common.py", 
> line
> 7, in ?
>     from libvtkCommonPython import *
> ImportError: Loaded module does not contain symbol 
> _initlibvtkCommonPython
>>>>
>
> I've tracked this down to the file
> ${VTK_DIR}/VTKBuild/Common/vtkCommonPythonInit.cxx, which includes the
> missing reference from above. The problem appears to be that the build
> process does not compile this file (no object file produced) or 
> attempt to
> link it (no link errors). After a build, the "Common" directory 
> contains 301
> ".cxx" files and 463 ".o" files including 150 object files with 
> "Python" in
> the filename, so a system appears to be built with the python wrapper.
>
> Other than python, the system otherwise works fine. I've run several 
> of the
> C++ and Tcl tests with no problems. I've also tried both VTK 4.2.2 and 
> 4.2.1
> with the same result. Other data that might help are:
>
> cmake 1.6.6 from darwinports
> Python 2.2.2 from fink
> Tcl 8.4 from fink
>
> Any help/insight on this problem would be greatly appreciated.
>
> Jeremy
>
>
Dr. Daniel James White BSc. (Hons.) PhD
Cell Biology
Department of biological and environmental science
PO Box  35
University of Jyväskylä
Jyväskylä FIN 40014
Finland
+358 (0)14 260 4183 (work)
+358 (0)414740463 (mob)

http://www.chalkie.org.uk
dan at chalkie.org.uk
white at cc.jyu.fi




More information about the vtkusers mailing list