[Python-apps-team] Bug#534524: Bug#534524: mayavi2: at runtime, ImportError: No module named libvtkCommonPython

Varun Hiremath varunhiremath at gmail.com
Thu Jun 25 03:24:38 UTC 2009


Hi Drew,

On Thu, 25 Jun, 2009 at 01:08:10PM +1000, Drew Parsons wrote:
> On Wed, 2009-06-24 at 22:51 -0400, Varun Hiremath wrote:
> > > $ mayavi2
> > > ImportError: No module named libvtkCommonPython
> 
> > I know this is a bug in python-vtk #529961, but mayavi2 loads on my
> > system without any problem. I don't know how you are getting this
> > import error from mayavi2. Can you check if you are able to "import
> > vtk" from a python shell. Looking at line 461 in /usr/bin/mayavi2,
> > this exception is caused by failure to import vtk, which shouldn't
> > happen.
> 
> Hi Varun, you're right, import vtk fails from a python shell.
> 
> > p.s. If nothing helps, you may try to reset PYTHONPATH (as suggested
> > in 529961):
> > PYTHONPATH=$PYTHONPATH:/usr/lib/python-support/python-vtk/python2.5/vtk
> > 
> 
> Yes, that works.
> "PYTHONPATH=PYTHONPATH:/usr/lib/python-support/python-vtk/python2.5/vtk
> mayavi2" is able to successfully launch mayavi2.
> 
> Curious that your system does work.  Have you hardwired that workaround
> in or would your system otherwise be the "same" as mine?

Hmm.. I am now wondering how it is working on my system because I have
not set the PYTHONPATH anywhere. Infact PYTHONPATH="" mayavi2 also
seems to work on my system. I am not a python expert, so any idea what
is going on here?

Regards,
Varun





More information about the Python-apps-team mailing list