2

我正在尝试在 Ubuntu 计算机上为 Python2 或 3 安装 SimpleElastix/SimpleITK,无论我们可以开始工作。使用 pip install 不起作用,因为那时不导入各种方法(例如,不存在“GetDefaultParameterMethod”)。我尝试按照他们网站上的说明进行操作(https://simpleelastix.readthedocs.io/GettingStarted.html#compiling-on-linux),但即使在整个过程中没有抛出任何错误,我仍然无法导入。对于 Python3,会弹出典型的“无模块”错误,但对于 Python2,我得到以下信息:

>>> import SimpleITK as sitk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/SimpleITK-1.0.1rc1.dev345+g9dfa8-py2.7-linux-x86_64.egg/SimpleITK/__init__.py", line 1, in <module>
    from .SimpleITK import *
  File "/usr/local/lib/python2.7/dist-packages/SimpleITK-1.0.1rc1.dev345+g9dfa8-py2.7-linux-x86_64.egg/SimpleITK/SimpleITK.py", line 17, in <module>
    _SimpleITK = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/SimpleITK-1.0.1rc1.dev345+g9dfa8-py2.7-linux-x86_64.egg/SimpleITK/SimpleITK.py", line 16, in swig_import_helper
    return importlib.import_module('_SimpleITK')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _SimpleITK

任何帮助将不胜感激 :)

4

0 回答 0