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

Mike Robertson fermion at mac.com
Thu Apr 25 20:42:18 EDT 2002


Anyone have any idea what could be confusing MayaVi here? These modules
exist. The one it's referring to is in /usr/local/bin... Perhaps the .so is
bothering it?

Thanks

[sull-10-114:documents/temp/mayavi-1.0] root# setenv
PYTHONPATH=/usr/local/bin/:/usr/local/vtk/VTK/Wrapping/Python/
[sull-10-114:documents/temp/mayavi-1.0] root# 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
  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
[sull-10-114:documents/temp/mayavi-1.0] root#


mike


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


". . . The Egyptians were obsessed with salt. They salted everything,
including their relatives. . ."

- NPR, 2/26/02



------ Forwarded Message
From: Mike Robertson <fermion at mac.com>
Date: Thu, 25 Apr 2002 20:27:55 -0400
To: David Gobbi <dgobbi at irus.rri.ca>
Subject: Re: [vtkusers] Mac os x: succcess, but...

Awesome. The setenv works now, but it's still returning the error. Perhaps
it's the .so extension that's confusing it?

[sull-10-114:documents/temp/mayavi-1.0] root# setenv
PYTHONPATH=/usr/local/bin/:/usr/local/vtk/VTK/Wrapping/Python/
[sull-10-114:documents/temp/mayavi-1.0] root# 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
  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
[sull-10-114:documents/temp/mayavi-1.0] root#


mike


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


Thousands of years ago, cats were worshiped as gods. Cats have never
forgotten this.



> From: David Gobbi <dgobbi at irus.rri.ca>
> Date: Thu, 25 Apr 2002 20:14:13 -0400 (EDT)
> To: Mike Robertson <fermion at mac.com>
> Subject: Re: [vtkusers] Mac os x: succcess, but...
> 
> Bah, Windows(TM) is rotting my brain.  Turn that semicolon into a colon.
> 
> - David
> 
> 
> On Thu, 25 Apr 2002, Mike Robertson wrote:
> 
>> I'm actually using setenv... For some reason it doesn't recognize
>> 'export'... Any idea how to do this with setenv?
>> 
>> setenv PYTHONPATH = /usr/local/vtk/VTK/Wrapping/Python/;/usr/local/bin/
>> setenv: Too many arguments.
>> 
>> 
>> mike
>> 
>> 
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Michael Robertson
>> fermion at mac.com
>> http://thenewcosmos.com
>> 
>> 
>> ". . . The Egyptians were obsessed with salt. They salted everything,
>> including their relatives. . ."
>> 
>> - NPR, 2/26/02
>> 
>> 
>> 
>>> From: David Gobbi <dgobbi at irus.rri.ca>
>>> Date: Thu, 25 Apr 2002 19:53:26 -0400 (EDT)
>>> To: Mike Robertson <fermion at mac.com>
>>> Cc: <vtkusers at public.kitware.com>
>>> Subject: Re: [vtkusers] Mac os x: succcess, but...
>>> 
>>> 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
>>>> 
>>> 
>>> 
>> 
> 
> 

------ End of Forwarded Message




More information about the vtkusers mailing list