Skip to main content
 首页 » 编程设计

python之SimpleITK 的 sudo easy_install 没那么容易

2025年02月15日8arxive

所以...我尝试了几种方法在 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 模式下

请您参考如下方法:

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

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