pip-3.3 SSL verification error , mac OSX 10.5.8

那年仲夏 提交于 2019-12-11 01:23:05

问题


I am getting an error when trying to run pip-3.3 install numpy from the terminal in OSX 10.5.8

here is the error in question: could not fetch URL...:

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:547)>

as far as i can tell there is no information on this at all on google or anywhere else for that matter. So any information anyone can provide would be nice because installing packages by hand is a pain.

pip version:

pip 1.3.1 from /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/pip-1.3.1-py3.3.egg (python 3.3)

The question I have is: Does anyone know what is causing this error and how I can fix it?

I can provide any other information you may need at request.


/Library/Frameworks/Python.framework/Versions/3.3/bin/pip run on Thu Apr 18 17:$
Downloading/unpacking numpy

  Getting page https://pypi.python.org/simple/numpy/
  Could not fetch URL https://pypi.python.org/simple/numpy/: There was a proble$

  Will skip URL https://pypi.python.org/simple/numpy/ when looking for download$

  Getting page https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/: There was a problem conf$

  Will skip URL https://pypi.python.org/simple/ when looking for download links$

  Cannot fetch index base URL https://pypi.python.org/simple/

  URLs to search for versions for numpy:
  * https://pypi.python.org/simple/numpy/
  Getting page https://pypi.python.org/simple/numpy/


    No distributions at all found for numpy
Storing complete log in /Users/codymallery/.pip/pip.log}

回答1:


Python versions for Mac OSX seem to be linked to a dated version of the SSL library, so the pypi SSL certificate fails some check.

The quick fix is to downgrade pip to a version that doesn't use SSL:

easy_install pip==1.2.1



回答2:


Since your certificate is not correct, use https instead or import it from the browser or command line and specify for pip:

pip --cert my-root.pem <args>

If you've file in CER format, you need to convert it into PEM file.



来源:https://stackoverflow.com/questions/16094187/pip-3-3-ssl-verification-error-mac-osx-10-5-8

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