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

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Jan 13 09:13:23 EST 2004


Martin,
	
	Try this maybe:

http://vtk.org/pipermail/vtkusers/2003-December/021355.html

HTH
Mathieu

Martin Dunschen wrote:
> 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%
> 
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic. 
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 






More information about the vtkusers mailing list