简体   繁体   English

使用 pip 安装 syslog-py 时出现 SSL 错误

[英]SSL error while installing syslog-py using pip

Trying to install sylog-py :尝试安装sylog-py

pip install syslog-py --trusted-host pypi.org --trusted-host files.pythonhosted.org --proxy="http://<xxxxxxxxx>:<xxxxxxxxx>@<0.0.0.0>:<xxxx>"

But received this error:但收到此错误:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))': /simple/syslog-py/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))': /simple/syslog-py/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))': /simple/syslog-py/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))': /simple/syslog-py/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))': /simple/syslog-py/
Could not fetch URL https://pypi.org/simple/syslog-py/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/syslog-py/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))) - skipping
ERROR: Could not find a version that satisfies the requirement syslog-py
ERROR: No matching distribution found for syslog-py

Please let me know how to install syslog-py properly.请让我知道如何正确安装syslog-py

Try using this method -尝试使用这种方法 -

python -m pip install syslog-py --trusted-host pypi.org --trusted-host files.pythonhosted.org

Successful response -成功响应——

...
Collecting syslog-py
  Downloading syslog_py-0.2.3-py2.py3-none-any.whl (7.0 kB)
Installing collected packages: syslog-py
Successfully installed syslog-py-0.2.3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM