【问题标题】:Unable to install SimpleITK library无法安装 SimpleITK 库
【发布时间】:2021-07-05 06:05:56
【问题描述】:

我正在使用以下命令进行安装:

python -m pip install SimpleITK

我在使用 CMake 时出错。错误信息如下:

CMake Error at /usr/share/cmake-3.10/Modules/ExternalData.cmake:1121 (message): Object MD5=890c808122bd90f398e6bc40ec862102 not found

完整的回溯如下:

Traceback:
Traceback (most recent call last):
      File "/home/ipcv-lab/.local/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 589, in setup
        cmkr.make(make_args, env=env)
      File "/home/ipcv-lab/.local/lib/python2.7/site-packages/skbuild/cmaker.py", line 507, in make
        os.path.abspath(CMAKE_BUILD_DIR())))
    
    An error occurred while building with CMake.
      Command:
        cmake --build . --target install --config Release --
      Source directory:
        /tmp/pip-build-cUCNSY/SimpleITK
      Working directory:
        /tmp/pip-build-cUCNSY/SimpleITK/_skbuild/linux-aarch64-2.7/cmake-build
    Please see CMake's output for more information.

我也尝试过使用 conda 进行安装,但我收到了频道不可用的错误

【问题讨论】:

    标签: python anaconda simpleitk


    【解决方案1】:

    看起来 cmake 正在尝试编译 SimpleITK。不知道为什么它需要为 pip 安装这样做。

    您可以尝试直接下载 SimpleITK 的 Python 轮并安装轮。您可以在此处下载该软件包:

    https://pypi.org/project/SimpleITK/#files
    

    此外,您似乎使用的是 Python 2.7。 2.7 不支持 SimpleITK。您将不得不使用 3.5 或更高版本。

    就 conda 而言,您是否使用“-c condo-forge”选项来选择正确的频道来下载 SimpleITK?

    【讨论】:

      【解决方案2】:

      如果您使用 Jupyter Notebook,只需在笔记本中输入

      !pip3 install SimpleITK
      

      这对我来说很容易。

      【讨论】:

        猜你喜欢
        • 2015-08-20
        • 2021-01-24
        • 2021-03-18
        • 1970-01-01
        • 2019-05-07
        • 2019-08-21
        • 2014-07-29
        • 2016-01-20
        • 2019-11-30
        相关资源
        最近更新 更多