sudo easy_install for SimpleITK not that easy

為{幸葍}努か 提交于 2019-12-13 15:25:35

问题


So... I've tried several ways to download SimpleITK (pip install) on Python but it's not working at all! (Here: SimpleITK python 2.7.12 installation issue) Now I'm using easy_install and I get this error:

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')

Apparently, it's some kind of certification issue that I have no idea how to overcome. :/ Heelp

EDIT: FINALLY GOT IT TO WORK!

With

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

In sudo su mode


回答1:


Most likely your python was not compiled with SSL support. You can check this with the following command:

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


来源:https://stackoverflow.com/questions/45192509/sudo-easy-install-for-simpleitk-not-that-easy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!