[vtkusers] Mac os x: succcess, but...

David Gobbi dgobbi at irus.rri.ca
Thu Apr 25 16:46:54 EDT 2002


Hi Mike,

The easiest solution is to set the PYTHONPATH variable to
/usr/local/vtk/VTK/Wrapping/Python/
either that or you can add a text file vtk.pth to
the site-packages directory in the python install
directory that contains the path, eg.
echo /usr/local/vtk/VTK/Wrapping/Python/ > <python-dir>/site-packages/vtk.pth

Because Tkinter uses Carbon but VTK is Quartz/Cocoa, you will not be able to
run MayaVI or any other VTK program that uses Tkinter.  That will have to
wait until VTK grows a Carbon compatibility layer (volunteers always welcome).

 - David

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

On Thu, 25 Apr 2002, Mike Robertson wrote:

> Alright. I've had much success now getting VTK to compile with python and
> tcl wrapping, *however*.... when I try to run mayavi, it returns this error:
>
> mprober2% python mayavi.py
> Traceback (most recent call last):
>   File "mayavi.py", line 3, in ?
>     import Main
>   File "./Main.py", line 18, in ?
>     import Base.Objects, Base.ModuleManager, Base.DataVizManager, Common
>   File "./Base/Objects.py", line 18, in ?
>     import Tkinter, vtkpython, math, tkColorChooser
> ImportError: No module named vtkpython
>
> Of course, I have vtkpython because I wrapped to python. :) It's here:
> /usr/local/vtk/VTK/Wrapping/Python/vtkpython.py
> /usr/local/vtk/VTK/Wrapping/Python/vtkpythontk.py
>
> How do I get this program to recognize its location? I wrapped using the
> system frameworks, after installing tcl 8.4 and a python 2.2.
>
>
> mike
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Michael Robertson
> fermion at mac.com
> http://thenewcosmos.com
>
>
> Thousands of years ago, cats were worshiped as gods. Cats have never
> forgotten this.
>
>
>
> _______________________________________________
> 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