所以...我正在尝试在 Python 2.7.12 上安装 SimpleITK,我尝试了几种方法,但都没有给我满意的结果。
1)通过简单地使用
pip install SimpleITK
我得到“没有为 SimpleITK 找到匹配的发行版”(我的 pip 版本是 9.0.1)
2) tar 文件(可在此处获得:https ://sourceforge.net/projects/simpleitk/files/SimpleITK/1.0.0/Python/ ):当我运行命令时
python setup.py install
我得到:
Download error on https://pypi.python.org/simple/scikit-build/: [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some
packages may not be found!
Couldn't find index page for 'scikit-build' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some
packages may not be found!
No local packages or download links found for scikit-build>=0.5
Traceback (most recent call last):
File "setup.py", line 50, in <module>
zip_safe=False
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 269, in
__init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 313, in
fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1
104, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 380, in
fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-
packages/setuptools/command/easy_install.py",
line 657, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for
Requirement.parse('scikit-build>=0.5')
我不明白缺少什么以及为什么我不能使用实用的方式(使用 pip)...... =(我也没有尝试过 Python 3(但我更愿意使用 Python 2.7,因为我更熟悉它)。
先感谢您!
编辑:终于开始工作了!