无法从mayavi导入mlab

时间:2014-05-30 15:54:32

标签: python-2.7 ipython-notebook

有类似的问题,但我无法从他们那里得到答案。 我通过Wakari使用Ipython和代码:

from mayavi import mlab

给出以下错误:


LinkError                                 Traceback (most recent call last)
<ipython-input-42-1486b54d78ba> in <module>()
      1 import numpy
----> 2 from mayavi import mlab
      3 
      4 def test_contour3d():
      5     x, y, z = numpy.ogrid[-5:5:64j, -5:5:64j, -5:5:64j]

/opt/anaconda/envs/np18py27-1.9/lib/python2.7/site-packages/mayavi/mlab.py in <module>    ()    
     25 
     26 # Mayavi imports
---> 27 from mayavi.tools.camera import view, roll, yaw, pitch, move
     28 from mayavi.tools.figure import figure, clf, gcf, savefig, \
     29     draw, sync_camera, close, screenshot    

/opt/anaconda/envs/np18py27-1.9/lib/python2.7/site-packages/mayavi/tools/camera.py in <module>()
     23 # We can't use gcf, as it creates a circular import in camera management
     24 # routines.
---> 25 from engine_manager import get_engine
     26 
     27 

/opt/anaconda/envs/np18py27-1.9/lib/python2.7/site-packages/mayavi/tools/engine_manager.py in <module>()
     12 from mayavi.preferences.api import preference_manager
     13 from mayavi.core.registry import registry
---> 14 from mayavi.core.engine import Engine
     15 from mayavi.core.off_screen_engine import OffScreenEngine
     16 from mayavi.core.null_engine import NullEngine

/opt/anaconda/envs/np18py27-1.9/lib/python2.7/site-packages/mayavi/core/engine.py in <module>()
     10 # VTK is used to just shut off the warnings temporarily.
     11 try:
---> 12     import vtk
     13 except ImportError, m:
     14     m.args = ('%s\n%s\nDo you have vtk and its Python bindings installed properly?' %

/opt/anaconda/envs/np18py27-1.9/lib/python2.7/site-packages/vtk/__init__.py in <module>()
     61     kits.append('rendering')
     62 except ImportError, exc:
---> 63     __helper.refine_import_err('rendering', 'vtkRenderingPython', exc)
     64 
     65 try:

/opt/anaconda/envs/np18py27-1.9/lib/python2.7/site-packages/vtk/__helper.pyc in refine_import_err(mod_name, extension_name, exc)
     30         pass
     31     if string.find(str(exc), extension_name) == -1:
---> 32         raise LinkError, str(exc)
     33 

LinkError: libGL.so.1: cannot open shared object file: No such file or directory

0 个答案:

没有答案