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

Dan Lipsa dan.lipsa at kitware.com
Mon Aug 3 14:03:30 EDT 2015


Does "vtkpython demo1.py" work? vtkpython is a wrapper around python that
includes the required VTK libraries.

On Mon, Aug 3, 2015 at 1:44 PM Manjunath K E <ke.manjunath at gmail.com> wrote:

> 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
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150803/762128a1/attachment.html>


More information about the vtkusers mailing list