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

David Gobbi dgobbi at irus.rri.ca
Thu Apr 25 19:53:26 EDT 2002


On Thu, 25 Apr 2002, Mike Robertson wrote:

> New error. I set the PYTHONPATH to /usr/local/vtk/VTK/Wrapping/Python/, but
> a lot of libraries are actually in /usr/local/bin/ (*.so). What should I do
> here? Just make some hard links, or set another env?

Just include that in that PYTHONPATH as well:
export set PYTHONPATH = /usr/local/vtk/VTK/Wrapping/Python/;<wherever>/bin

 - David


> Thanks.
>
> 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
>   File "/usr/local/vtk/VTK/Wrapping/Python/vtkpython.py", line 29, in ?
>     exec "from "+kit_name+" import *"
>   File "<string>", line 1, in ?
> ImportError: No module named libvtkCommonPython
>
>
> 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: David Gobbi <dgobbi at irus.rri.ca>
> > Date: Thu, 25 Apr 2002 16:46:54 -0400 (EDT)
> > To: Mike Robertson <fermion at mac.com>
> > Cc: <vtkusers at public.kitware.com>
> > Subject: Re: [vtkusers] Mac os x: succcess, but...
> >
> > 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
> >>
> >
> >
>
> _______________________________________________
> 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