【问题标题】:sudo easy_install for SimpleITK not that easySimpleITK 的 sudo easy_install 并不那么容易
【发布时间】:2017-12-24 20:10:04
【问题描述】:

所以...我尝试了几种在 Python 上下载 SimpleITK(pip 安装)的方法,但它根本不起作用! (此处:SimpleITK python 2.7.12 installation issue)现在我正在使用 easy_install,但出现此错误:

Searching for simpleitk
Reading https://pypi.python.org/simple/simpleitk/
Download error on https://pypi.python.org/simple/simpleitk/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'simpleitk' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
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 simpleitk
error: Could not find suitable distribution for Requirement.parse('simpleitk')

显然,这是某种我不知道如何克服的认证问题。 :/帮助

编辑:终于开始工作了!

pip install --trusted-host pypi.python.org SimpleITK

在 sudo su 模式下

【问题讨论】:

  • 我尝试运行 pip install simpleitk 并且使用 python 2.7.12 和 pip 9.0.1 没有遇到任何问题
  • 我了解...问题是我使用的计算机存在某种奇怪的安全漏洞。但我想通了=)

标签: python ssl certificate simpleitk


【解决方案1】:

很可能您的 python 没有使用 SSL 支持编译。您可以使用以下命令进行检查:

python -c 'import socket; print(hasattr(socket, "ssl"))'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-04-30
    • 1970-01-01
    • 2015-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多