[vtkusers] VTK 4.2.2 with Python 2.3 on OS X
brownr at ucalgary.ca
brownr at ucalgary.ca
Mon Aug 4 17:57:27 EDT 2003
A few of us on the Mac Python mailing list have been discussing this... the
problem arises because loadable modules (like Python modules) and shared
libraries are not the same thing on Mach-O based systems (which OSX is). On
Linux systems it looks like all the VTK Python modules are linked against
each other - you can't do this on the Mac because they're modules, not
libraries. So some tricks were used to get it working. In the interest of
stability, the Python 2.3 release no longer supports this. There is a
recommended way of solving this problem (implemented in the Numeric/Numarray
package). So the question is, how hard is it to modify the VTK wrapping
system to do this? The few of us on the Python list don't know much about
it, so we need some expertise from this list. Any experts in VTK Python
wrapping?
Karl Garsha <garsha at itg.uiuc.edu> said:
> Actually I've been wrestling with the same problem over the past week.
> The 2.3 Python build is better integrated with the native windowing
> system and wxPython works better, but, much to my disappointment, there
> is some sort of linking issue when I try to import vtk from the
> interpreter. The 2.2.3 build of Python works fine with VTK+Python on OS
> X, but the Python GUI API's aren't as well integrated as with 2.3. I
> would also appreciate any ideas as to how to straighten out this
> issue--I wish I could provide you with an answer.
> -Karl
>
> Robb Brown wrote:
>
> > Has anyone gotten VTK running with Python 2.3 on OSX? The switch from
> > Python 2.2 to 2.3 appears to break VTK's wrapping. When doing an
> > "import vtk" here's the error:
> >
> > 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 vtk
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-
> > packages/vtk_python/vtk/__init__.py", line 8, in ?
> > from filtering import *
> > File
> > "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-
> > packages/vtk_python/vtk/filtering.py", line 7, in ?
> > from libvtkFilteringPython import *
> > ImportError: Failure linking new module: : dyld:
> > /Library/Frameworks/Python.framework/Versions/2.3/Resources/Python.app/
> > Contents/MacOS/Python Undefined symbols:
> > _PyArg_VTKParseTuple
> > _PyVTKClass_Check
> > _PyVTKClass_New
> > _PyVTKClass_vtkCollectionNew
> > _PyVTKClass_vtkDataObjectNew
> > _PyVTKClass_vtkImplicitFunctionNew
> > _PyVTKClass_vtkLocatorNew
> > _PyVTKClass_vtkObjectNew
> > _PyVTKClass_vtkPointLocatorNew
> > _PyVTKClass_vtkScalarsToColorsNew
> > _PyVTKClass_vtkSourceNew
> > __Z19vtkPythonCheckArrayP7_objectiPfi
> > __Z19vtkPythonCheckArrayP7_objectiPi
> > >>>
> >
> >
> > vtkCommon is built, and is accessible (in the same place as all the
> > other libraries). It's been suggested on the Python list this might be
> > due to VTK's use of -flat_namespace. Does anyone have any thoughts?
> >
> > Build was with GCC 3.1 (same as Python) and VTK using Carbon.
> >
> > Thanks,
> >
> > Robb
> >
> > _____________________________
> > Robb Brown
> > Seaman Family MR Center
> > Calgary, AB
> >
> > _______________________________________________
> > 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