[英]installing mayavi with pip - Building TVTK classes…Assertion failed
我一直在尝试在优胜美地安装mayavi。 我已经安装了Numpy,VTK,wxPython和configobj。 当我运行sudo pip install mayavi
,它显示以下错误msg:
Running setup.py install for mayavi
----------------------------------------------------------------------
Building TVTK classes...Assertion failed: ("pre: not_empty" && !IsEmpty()), function
GetAttributesToInterpolate, file /tmp/vtk-MvPwfE/VTK-6.1.0/Common/DataModel
/vtkGenericAttributeCollection.cxx, line 453.
Complete output from command /usr/local/opt/python/bin/python2.7 -c "import
setuptools,tokenize;__file__='/private/tmp/pip_build_root/mayavi/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
__file__, 'exec'))" install --record /tmp/pip-haj8cd-record/install-record.txt
--single-version-externally-managed --compile:
running install
running build
我不知道该如何处理。
以下内容可能会有所帮助。
{20:06:44}~/test ➭ which pip
/usr/local/bin/pip
{20:07:13}~/test ➭ which python
/usr/local/bin/python
{20:07:25}~/test ➭ python
Python 2.7.9 (default, Dec 19 2014, 06:00:59)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
>>> vtk
<module 'vtk' from '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'>
>>>
我通过点子解决了相同的问题:
pip install git+https://github.com/enthought/mayavi.git
使用这种格式,您可以使用pip从特定的git repo安装。 通常:
pip install git+(web address of git repo)
我git克隆了mayavi,然后运行python setup.py install
。 有用。
使用pypi的tar和pip时,我遇到了类似的问题。 我从Github下载了当前的zip文件,并将其扩展到一个临时目录中。 由于安装原因,我不得不运行两次“ python setup.py install”命令,然后安装完成。 现在,mayavi模块可以正常工作。 我在openSUSE 13.2上运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.