[vtkusers] python: 'import vtk' fails... (Mac OS X 10.2)

Martin Dunschen zabaione at uk2.net
Tue Jan 13 08:14:46 EST 2004


I have managed to compile the vtk libs and successfully ran 'sudo make  
install' from the directory where I had built VTK.

The problems I had earlier with undefined symbols in linking c++  
applications where solved by forcing project builder to use gcc v3.

No I would like to run the python examples, but I fail:

Below is a screen dump of the 'import vtk' envoked from python.
My interpretation is that it finds the python libraries but cant load  
them.

What is wrong?


---------------------8<--------------------------------- 
8<----------------------------------------------



[Martin-Dunschens-Computer:~] martin% vtkpython
vtk version 4.2.5, vtk source $Revision: 1.1495 $, $Date: 2003/02/18  
03:45:04 $ (GMT)
Python 2.3 (#2, Jul 30 2003, 11:45:28)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import sys
 >>> print sys.path
['',  
'/Users/martin/Development/CHook_Folder/VTK-4.2/osxBin/Wrapping/ 
Python', '/Users/martin/Development/CHook_Folder/VTK-4.2/osxBin/bin',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python23.zip',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat- 
darwin',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat- 
mac',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat- 
mac/lib-scriptpackages',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib- 
tk',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib- 
dynload',  
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site- 
packages']
 >>> import vtk
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File  
"/Users/martin/Development/CHook_Folder/VTK-4.2/osxBin/Wrapping/Python/ 
vtk/__init__.py", line 27, in ?
     from common import *
   File  
"/Users/martin/Development/CHook_Folder/VTK-4.2/osxBin/Wrapping/Python/ 
vtk/common.py", line 7, in ?
     from libvtkCommonPython import *
ImportError: Loaded module does not contain symbol  
_initlibvtkCommonPython
 >>> ^D
[Martin-Dunschens-Computer:~] martin%




More information about the vtkusers mailing list