将 Mayavi 安装到 Anaconda 中

Installing Mayavi into Anaconda

我想将 Mayavi 安装到我的 anaconda 安装中,为此我 运行 使用了以下命令,但收到一条错误消息,我不确定如何处理:

user@Kubuntu:~$ source activate myenv
(myenv)user@Kubuntu:~$ conda install mayavi
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ....
Solving package specifications: ....

The following specifications were found to be in conflict:
  - anaconda-client (target=anaconda-client-1.6.0-py35_0.tar.bz2) -> python 2.7*|3.3*|3.4*|3.5*|3.6*
  - anaconda-client (target=anaconda-client-1.6.0-py35_0.tar.bz2) -> pytz
  - anaconda-client (target=anaconda-client-1.6.0-py35_0.tar.bz2) -> requests *|>=2.9.1
  - behave (target=behave-1.2.5-py35_0.tar.bz2) -> parse >=1.6.3
  - behave (target=behave-1.2.5-py35_0.tar.bz2) -> python 3.5*
  - clyent (target=clyent-1.2.2-py35_0.tar.bz2) -> python 2.7*|3.3*|3.4*|3.5*|3.6*
  - cycler (target=cycler-0.10.0-py35_0.tar.bz2) -> python 2.7*|3.4*|3.5*|3.6*
  - cycler (target=cycler-0.10.0-py35_0.tar.bz2) -> six
  - matplotlib (target=matplotlib-1.5.3-np111py35_1.tar.bz2) -> freetype 2.4*
  - matplotlib (target=matplotlib-1.5.3-np111py35_1.tar.bz2) -> numpy 1.10*|1.11*|1.5*|1.6*|1.7*|1.8*|1.9*
  - matplotlib (target=matplotlib-1.5.3-np111py35_1.tar.bz2) -> pyparsing *|1.5.6|2.0.1|2.0.3
  - matplotlib (target=matplotlib-1.5.3-np111py35_1.tar.bz2) -> pyqt 4.*|5.*
  - matplotlib (target=matplotlib-1.5.3-np111py35_1.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*
  - matplotlib (target=matplotlib-1.5.3-np111py35_1.tar.bz2) -> pytz
  - mayavi -> numpy *|1.7*|1.8*|1.9*
  - mayavi -> pyqt 4.*
  - mayavi -> python 2.7*
  - mayavi -> setuptools
  - numpy (target=numpy-1.11.3-py35_0.tar.bz2) -> python 2.7*
  - pandas (target=pandas-0.19.2-np111py35_1.tar.bz2) -> numpy 1.10*|1.11*|1.6*|1.7*|1.8*|1.9*
  - pandas (target=pandas-0.19.2-np111py35_1.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*
  - pandas (target=pandas-0.19.2-np111py35_1.tar.bz2) -> pytz                                                                                                                                             
  - pandas (target=pandas-0.19.2-np111py35_1.tar.bz2) -> scipy                                                                                                                                            
  - parse (target=parse-1.6.6-py35_0.tar.bz2) -> python 3.5*                                                                                                                                              
  - parse_type (target=parse_type-0.3.4-py35_0.tar.bz2) -> parse >=1.6                                                                                                                                    
  - parse_type (target=parse_type-0.3.4-py35_0.tar.bz2) -> python 3.5*                                                                                                                                    
  - parse_type (target=parse_type-0.3.4-py35_0.tar.bz2) -> six                                                                                                                                            
  - pip (target=pip-9.0.1-py35_1.tar.bz2) -> python 2.7*                                                                                                                                                  
  - pip (target=pip-9.0.1-py35_1.tar.bz2) -> wheel                                                                                                                                                        
  - py (target=py-1.4.32-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*                                                                                                                          
  - pyparsing (target=pyparsing-2.1.4-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*                                                                                                             
  - pyqt (target=pyqt-5.6.0-py35_1.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*                                                                                                                       
  - pytest (target=pytest-3.0.5-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*                                                                                                                   
  - python 3.5*                                                                                                                                                                                           
  - python-dateutil (target=python-dateutil-2.6.0-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*                                                                                                 
  - python-dateutil (target=python-dateutil-2.6.0-py35_0.tar.bz2) -> six                                                                                                                                  
  - pytz (target=pytz-2016.10-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*                                                                                                                     
  - pyyaml (target=pyyaml-3.12-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*                                                                                                                    
  - requests (target=requests-2.12.4-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*
  - scipy (target=scipy-0.18.1-np111py35_1.tar.bz2) -> numpy 1.10*|1.11*|1.5*|1.6*|1.7*|1.8*|1.9*
  - scipy (target=scipy-0.18.1-np111py35_1.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*
  - setuptools (target=setuptools-27.2.0-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*
  - sip (target=sip-4.18-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*
  - six (target=six-1.10.0-py35_0.tar.bz2) -> python 2.6*|2.7*|3.3*|3.4*|3.5*|3.6*
  - wheel (target=wheel-0.29.0-py35_0.tar.bz2) -> python 2.7*|3.3*|3.4*|3.5*|3.6*
Use "conda info <package>" to see the dependencies for each package.

问题 mayavi in python Anaconda 是关于 Windows 的另一个错误,而不是 Linux。

我该怎么办?

问题是 conda 包适用于 Python 2.7,而您有 python 3.5。在 https://anaconda.org/search?q=mayavi 搜索合适的包裹。在那里你找到包 conda install -c menpo mayavi=4.5.0 你可以用 conda install -c menpo mayavi=4.5.0 安装它并且应该与 Python 3.5.

一起使用

我遇到了类似的问题,很好奇为什么会这样。这是在 Ubuntu 16.04;刚刚下载了最新版本的 Anaconda。

$ conda install -c anaconda mayavi=4.5.0 Fetching package metadata ........... Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict: - mayavi 4.5.0* -> pyqt 4.* -> python 2.6* -> openssl 1.0.1* - python 3.6* Use "conda info " to see the dependencies for each package

$ conda install -c menpo mayavi=4.5.0 Fetching package metadata ........... Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict: - mayavi 4.5.0* -> python 2.7* -> openssl 1.0.1* - python 3.6* Use "conda info " to see the dependencies for each package.

执行 'conda info mayavi' 显示没有 Python 3 及更高版本。

当 conda 无法解决问题时,安装软件包的最佳过程是什么?

conda 安装-c menpo mayavi=4.5.0

您可以尝试以下方法:

如果您安装了 Visual Studio,并且安装了 Python 本机开发工具。

在 Anaconda3 中,您可以从 clinicalgraphics 中获取 VTK7。1.x

conda install -c clinicalgraphics vtk

打开 VS20xx x64 本机命令提示符,正确设置 python 的路径: 例如C:\Anaconda3\Scripts\activate.bat C:\Anaconda3

然后使用 pip 从源安装 mayavi。

pip install mayavi

它在 windows 10.

中使用 VS2017 和 Python 3.6 编译成功