簡體   English   中英

用pip安裝mayavi-構建TVTK類…斷言失敗

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM