[vtkusers] Trying to use VTK library in Python Interpreter

Heidler, Kirstin (GE Oil & Gas) Kirstin.Heidler at ge.com
Tue Aug 28 03:39:37 EDT 2012


Hello Hesam,

 

I had some troubles installing VTK for python. Somehow the libraries
were not properly linked.

I did not solve that error, but I found a different solution which works
very well.

 

http://www.lfd.uci.edu/~gohlke/pythonlibs/
<http://www.lfd.uci.edu/~gohlke/pythonlibs/> 

 

On this page you can find an executable which installs VTK for python.
(just search for vtk on the page)

 

Afterwards, when you try to import vtk, it fails the first time, but
works the second time and any afterward. (Not sure why that happens I
suppose it has something to do with unbuilt binaries)

 

Cheers, 

Kirstin

 

Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] Im
Auftrag von Hesam
Gesendet: Montag, 27. August 2012 19:39
An: vtkusers at vtk.org
Betreff: [vtkusers] Trying to use VTK library in Python Interpreter

 

Hi all,

Goal: Trying to use VTK library in Python Interpreter.

What I did: I have installed VTK using CMake with option VTK_WRAP_PYTHON
and Shared_Library enabled and build the VTK in visual studio and it has
finished with all builds successfully. Then I made the Python_Path.

Problem: When I try to import vtk library into python, I get the
following error message:

 
>>> import vtk



Traceback (most recent call last):


  File "<pyshell#0>", line 1, in <module>


    import vtk


  File "...\VTK\VTKvisual\Wrapping\Python\vtk\__init__.py", line 42, in
<module>


    from vtkFilteringPython import *


ImportError: No module named vtkFilteringPython



Any thoughts that why this is happening?

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120828/5acae559/attachment.htm>


More information about the vtkusers mailing list