[vtkusers] no module named vtk
Aron Wahlberg
aron at simula.no
Wed Mar 10 09:18:19 EST 2010
Thanks for answering.
Well, I don't seem to have vtkpython either :S
Type "help", "copyright", "credits" or "license" for more information.
>>> from vtkpython import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named vtkpython
>>>
Aron-Wahlbergs-MacBook-Pro:~ aron$ which vtkpython
Aron-Wahlbergs-MacBook-Pro:~ aron$ locate vtkpython
Aron-Wahlbergs-MacBook-Pro:~ aron$ vtkpython
-bash: vtkpython: command not found
Aron-Wahlbergs-MacBook-Pro:~ aron$
Aron
On 4 Mar, 2010, at 17:36, David Feng wrote:
> You have to put the vtk libraries on the python path. I can never
> remember how to do this, but if you run your script with vtkpython
> instead of python, 'import vtk' should work. vtkpython sets up your
> python path for you, I believe. A quick scan of the vtk-devel macport
> indicates that vtkpython is getting installed, so you should be fine.
>
> David
>
> On Wed, Mar 3, 2010 at 6:56 AM, Aron Wahlberg <aron at simula.no> wrote:
>> I get the following error when I try to import vtk
>>
>> Aron-Wahlbergs-MacBook-Pro:vtk-5.4 aron$ python -c 'import vtk'
>> Traceback (most recent call last):
>> File "<string>", line 1, in <module>
>> ImportError: No module named vtk
>>
>>
>> I have installed vtk via macports and have the following version:
>>
>> port installed vtk-devel
>> The following ports are currently installed:
>> vtk-devel @5.4.2_1+cocoa+data+doc+examples+shared+testing (active)
>>
>> I'm somewhat of a newbie on those things and would appreciate any help to track down the problem.
>>
>> Aron
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
>
> --
> http://www.cs.unc.edu/~dfeng
More information about the vtkusers
mailing list