Errors while trying to install pip from terminal

三世轮回 提交于 2021-01-29 10:45:24

问题


I am trying to install pip3 via a bash script/terminal. I am using the following commands:

curl -O https://bootstrap.pypa.io/get-pip.py
/usr/local/bin/python3.6 get-pip.py

When I run these two commands, I get some weird errors that I am not understanding. Can someone please explain what these errors mean and how to fix them (or let me know if there is a better way to install pip3 other than brew)?

Operating system: Mac OSX
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1603k  100 1603k    0     0  8216k      0 --:--:-- --:--:-- --:--:-- 8224k
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip
  Cache entry deserialization failed, entry ignored
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
  Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
  Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Cache entry deserialization failed, entry ignored
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping

回答1:


The reason of this error message is the SSL module is missing from your system, you can't perform any request to an HTTPS URL, Try without "s" http instead of https

OR THE BEST, install OpenSSL maybe with brew install openssl check the official docs for more information, good luck!



来源:https://stackoverflow.com/questions/50911641/errors-while-trying-to-install-pip-from-terminal

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