【问题标题】:How can I install mayavi on Windows for python 3 via conda?如何通过 conda 在 Windows 上为 python 3 安装 mayavi?
【发布时间】:2017-07-18 13:12:02
【问题描述】:

我在 Windows 上有一个由 conda 管理的 python 3 虚拟环境。我想通过

安装 mayavi 包
conda install mayavi

但它说它需要 python 2.7。

【问题讨论】:

    标签: python windows conda mayavi


    【解决方案1】:

    祝您好运,mayavi 包在其他频道上可用,searching on the Anaconda website

    截至今天,conda-forge 频道上维护的频道与 python 3.5 和 3.6 兼容。要安装它,

    conda install -c conda-forge mayavi
    

    如果mayavi 失败并显示

    ImportError: Could not import backend for traits
    

    可能是因为没有安装 qt 或者安装了 qt5 -- 在这种情况下需要降级

    conda install pyqt=4
    

    【讨论】:

      【解决方案2】:

      您可以尝试以下方法:

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

      在 Anaconda3 中,您可以从临床图形学中获取 VTK7.1.x

      conda install -c clinicalgraphics vtk
      

      打开 VS20xx x64 Native Command Prompt,正确设置 Python 的 PATH: 例如

      C:\Anaconda3\Scripts\activate.bat C:\Anaconda3
      

      然后使用 pip 从源代码安装 mayavi。

      pip install mayavi
      

      在windows 10中使用VS2017和Python 3.6编译成功。

      【讨论】:

        猜你喜欢
        • 2022-12-24
        • 2014-05-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-11-11
        • 2016-02-11
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多