[vtkusers] How to install vtk?

David Doria daviddoria+vtk at gmail.com
Fri Dec 18 07:33:15 EST 2009


On Fri, Dec 18, 2009 at 6:50 AM, Julian CHIA Yan Hon <
julian-chia at imre.a-star.edu.sg> wrote:

> I am trying to run an example script of vtk with a python wrapper. However,
> I get the following error message. Can someone advice me how I can import
> the vtk module from the python compiler? Thank you.
>
> Traceback (most recent call last):
>  File "G:\vtk\vtk542_source\Examples\Medical\Python\Medical2.py", line 6,
> in <module>
>    import vtk
> ImportError: No module named vtk
>
>
>
It looks like you need to add the VTKPythonWrapping directory to your Python
path. In linux, you would add this to your ~/.bashrc

export
PYTHONPATH=$PYTHONPATH:/home/doriad/bin/ParaView3/Utilities/VTKPythonWrapping

In Windows, you have to go into wherever you can edit the system variables
and do the same type of thing. Maybe a Windows user can direct you further
if you can't find it.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091218/90301061/attachment.htm>


More information about the vtkusers mailing list