[vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04)

Manjunath K E ke.manjunath at gmail.com
Mon Aug 3 13:43:38 EDT 2015


Hi all

I have installed VTK 6.2 along with vtk 6.2 python  interface on ubuntu
14.04 manually.

When I run vtkpython in interpreter mode, the import of vtk is successful.
It doesn't have any problem  and the same is shown below.

===========================================================
manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$
vtkpython
vtk version 6.2.0
Python 2.7.2 (default, Feb 12 2015, 18:30:44)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from vtk import *
>>> print vtk
<module 'vtk' from
'/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'>
>>>
===========================================================

But, If i run a python script then an error is obtained for this line "from
vtk import *". The error is as shown below.
===========================================================
manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$
./demo1.py
Traceback (most recent call last):
  File "./demo1.py", line 6, in <module>
    from vtk import *
ImportError: No module named vtk
===========================================================

Please help me in solving this issue. I appreciate your time and help.

 Thanks and Regards,

 Manjunath K E
 Help Ever Hurt Never
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150803/4d2ca247/attachment.html>


More information about the vtkusers mailing list