简体   繁体   中英

installing mayavi with pip - Building TVTK classes…Assertion failed

I've been trying to install mayavi in Yosemite. I've already installed the Numpy, VTK, wxPython, and configobj. When I run sudo pip install mayavi , it shows the following error 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

I've no idea how to deal with this.

The following might be helpful.

{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'>
>>> 

I solved the same issue through pip with:

pip install git+https://github.com/enthought/mayavi.git

Using this format, you can use pip to install from a particular git repo. Generally:

pip install git+(web address of git repo)

I git cloned the mayavi, and run python setup.py install . It works.

I had a similar problem when using the tar and pip from pypi. I downloaded the current zip file from Github and expanded it in a temporary directory. I had to run the 'python setup.py install' command twice for some reason before the install ran to completion. The mayavi module now works fine. I'm running on openSUSE 13.2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM