[vtkusers] Bizarre Python Errors

Mike Robertson fermion at mac.com
Sun Apr 28 22:50:53 EDT 2002


Here's the result:

[localhost:local/vtk/VTK] root# python
Python 2.2 (#1, Apr 25 2002, 11:43:25)
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/vtk/VTK/Wrapping/Python/vtk/__init__.py", line 8, in ?
    from filtering import *
  File "/usr/local/vtk/VTK/Wrapping/Python/vtk/filtering.py", line 7, in ?
    from libvtkFilteringPython import *
ImportError: Failure linking new module
>>> 

The reason I didn't compile with shared libraries is presumably specific to
mayavi. Here's the error it returns when vtk is compiled with sharing on:
[localhost:documents/temp/mayavi-1.0] root# python mayavi.py
Traceback (most recent call last):
  File "mayavi.py", line 4, in ?
    Main.main ()
  File "./Main.py", line 947, in main
    v = MayaVi (r)
  File "./Main.py", line 139, in __init__
    self.renwin = Misc.RenderWindow.RenderWindow (self.renwin_frame)
  File "Misc/RenderWindow.py", line 41, in __init__
    height=500)
  File "/usr/local/vtk/VTK/Wrapping/Python/vtkTkRenderWidget.py", line 65,
in __
init__
    vtkLoadPythonTkWidgets(master.tk)
  File "/usr/local/vtk/VTK/Wrapping/Python/vtkLoadPythonTkWidgets.py", line
59, 
in vtkLoadPythonTkWidgets
    interp.call('load', filename)
TclError: dyld: permission denied
[localhost:documents/temp/mayavi-1.0] root#

With sharing off, it returns no such Tcl errors; rather, the errors
correspond with those returned from the python shell.

mike


~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michael Robertson
fermion at mac.com
http://thenewcosmos.com


"The wisdom of the wise and the experience of the ages are perpetuated by
quotations."

-Benjamin Disraeli



> From: Prabhu Ramachandran <prabhu at aero.iitm.ernet.in>
> Date: Mon, 29 Apr 2002 08:15:19 +0530
> To: Mike Robertson <fermion at mac.com>, VTK users list
> <vtkusers at public.kitware.com>
> Subject: [vtkusers] Bizarre Python Errors
> 
> hi,
> 
> Yes, your errors look wierd.  Why havent you compiled the vtk
> libraries as shared libraries?  What problems did you face with that
> approach?
> 
> Could you also try to do an import vtk on the interpreter.  You
> _might_ get clearer error messages (atleast it will tell you which
> module failed to import).
> 
>>>> import vtk
> 
> Hope this helps.
> prabhu
> 
> 
>>>>>> "MR" == Mike Robertson <fermion at mac.com> writes:
> 
>   MR> Hi! I don't think this has anything to do with mac os x,
>   MR> although, of course, I'm using mac os x. I've installed VTK to
>   MR> wrap to both python and tcl. CMakeCache.txt file is
>   MR> attached. I'm getting some unusual errors when I go to import
>   MR> vtkpython. But, oddly enough, the thing has no qualms
>   MR> importing libvtkCommonPython.... I installed everything in
>   MR> /usr/local/vtk/VTK/ (so the wrapping for python is
>   MR> /usr/local/vtk/VTK/Wrapping/Python/) and did not run a make
>   MR> install, as I have unsuccessfully done before. vtkpython is
>   MR> here: /usr/local/vtk/VTK/Wrapping/Python. The libraries are
>   MR> not shared (had some problems with that earlier...)  Here's
>   MR> the error:
> 
>   MR> [localhost:VTK/Wrapping/Python] root# python Python 2.2 (#1,
>   MR> Apr 25 2002, 11:43:25) [GCC 2.95.2 19991024 (release)] on
>   MR> darwin Type "help", "copyright", "credits" or "license" for
>   MR> more information.
>>>>> import libvtkCommonPython import Tkinter import vtkpython
>   MR> Traceback (most recent call last): File "<stdin>", line 1, in
>   MR> ?  File "/usr/local/vtk/VTK/Wrapping/Python/vtkpython.py",
>   MR> line 29, in ?  exec "from "+kit_name+" import *" File
>   MR> "<string>", line 1, in ?  ImportError: Failure linking new
>   MR> module
>>>>> 
>   MR> [localhost:VTK/Wrapping/Python] root# what the heck
> 
>   MR> Any ideas? Of course, yes, I told the thing were to find all
>   MR> of the libs by entering setenv PYTHONPATH
>   MR> /usr/local/vtk/VTK/bin:/usr/local/vtk/VTK/Wrapping/Python
> 
>   MR> Thanks!
> 
>   MR> mike
> 
> _______________________________________________
> 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