[vtkusers] Bizarre Python Errors

David Gobbi dgobbi at irus.rri.ca
Sun Apr 28 23:45:27 EDT 2002


Hi Mike,

Prabhu is correct, you should stick to shared libraries because when
you were using shared libraries the python modules were loading.
Go back to using shared libs and make sure that you can do either a
'from vtkpython import *' or 'from vtk import *' from the python shell.

The problem appears to be that libvtkRenderingPythonTkWidgets (which is
in fact a tk extension module) will not load.  It is simply not yet
possible to use the vtkTkRenderWidget under OSX AFAIK, because VTK does
not yet work with Carbon (I'm not a mac guy, so I don't have all the
details).

It might be possible to work around this by re-compiling VTK so that
it uses XWindows for the GUI, but unless XWindows supports accelerated
OpenGL under OSX there isn't much point.  Has anyone tried this yet?

 - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario


On Mon, 29 Apr 2002, Prabhu Ramachandran wrote:

> >>>>> "MR" == Mike Robertson <fermion at mac.com> writes:
>
>     MR> Here's the result: [localhost:local/vtk/VTK] root# python
>     MR> Python 2.2 (#1, Apr 25 2002, 11:43:25) [GCC 2.95.2 19991024
>     MR> (release)] on darwin Type "help", "copyright", "credits" or
>     MR> "license" for more information.
>     >>>> import vtk
>     MR> Traceback (most recent call last): File "<stdin>", line 1, in
>     MR> ?  File "/usr/local/vtk/VTK/Wrapping/Python/vtk/__init__.py",
>     MR> line 8, in ?  from filtering import * File
>     MR> "/usr/local/vtk/VTK/Wrapping/Python/vtk/filtering.py", line 7,
>     MR> in ?  from libvtkFilteringPython import * ImportError: Failure
>     MR> linking new module
>     >>>>
>
> Ah, the filtering module will try to link to another module (the
> vtkCommon module) and fails because of the static compile.
>
>     MR> line 65, in __ init__ vtkLoadPythonTkWidgets(master.tk) File
>     MR> "/usr/local/vtk/VTK/Wrapping/Python/vtkLoadPythonTkWidgets.py",
>     MR> line 59, in vtkLoadPythonTkWidgets interp.call('load',
>     MR> filename) TclError: dyld: permission denied
>     MR> [localhost:documents/temp/mayavi-1.0] root#
>
>     MR> With sharing off, it returns no such Tcl errors; rather, the
>     MR> errors correspond with those returned from the python shell.
>
> Which is actually far better than your current error (because you
> could import all of VTK previously and only the Tkinter widget
> failed).  The problem you are having with vtkLoadPythonTkWidgets.py
> might be because Tcl is compiled statically?  I'm not sure on this
> though.
>
> prabhu
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list