python - 错误:没有为 pandas 找到匹配的分布 - “pip install pandas”
问题描述
我刚刚在我的办公机器上安装了 Python。我已经安装了 Python Python 3.7 - 64 位和 Python 3.8 - 32 位。然后我卸载了 32 位,因为我的 Windows 是 64 位。
我想使用 pip 安装熊猫。但我收到以下错误。
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pandas/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pandas/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pandas/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pandas/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pandas/
ERROR: Could not find a version that satisfies the requirement pandas (from versions: none)
ERROR: No matching distribution found for pandas
为了解决这个错误,我执行了以下一系列步骤。
- 在命令提示符下。我设置了以下内容:
设置 http_proxy=http://username:password@proxy.server.com:8080 设置 https_proxy=https://username:password@proxy.server.com:8080
- 我将目录更改为保存脚本文件夹的位置。
cd C:\Users\username\AppData\Local\Programs\Python\Python37\Scripts
- 然后我运行以下命令
pip install pandas --user
- 它给了我以下错误
ERROR: Could not install packages due to an EnvironmentError: Failed to parse: https://username:password@proxy.server.com:8080
这是因为我的公司网络设置吗?我该如何解决这个问题?
解决方案
我能够解决这个问题。
我的密码中有一个特殊字符 (#),我将其替换为 %23 参考链接
在我运行 pip install pandas --user 进行此更改后,我收到以下错误。
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/certifi/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/certifi/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/certifi/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/certifi/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))': /simple/certifi/
Could not fetch URL https://pypi.org/simple/certifi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/certifi/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))) - skipping
ERROR: Could not find a version that satisfies the requirement certifi (from versions: none)
ERROR: No matching distribution found for certifi
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(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)'))) - skipping
为了解决这个问题,我使用了以下命令 -
pip --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install pandas --user
结果 -
Successfully installed numpy-1.19.0 pandas-1.0.5 python-dateutil-2.8.1 pytz-2020.1 six-1.15.0
推荐阅读
- r - 标记第一次出现的数字和之后的所有行
- ios - UITableViewCell 详细文本标签布局不当
- java - firebase 错误 默认 FirebaseApp 未在此过程中初始化
- java - 如何找出进入 Oracle 数据库的连接数?
- database - 关系数据库工具,可以显示 PDF blob
- php - 如何根据字母和数字在PHP中拆分字符串
- javascript - 保存方法中的MongoDB当前日期
- php - 为什么我的变量出现未定义,des?
- html - '溢出:隐藏/自动;' 不纠正浮动元素的页面边框问题
- python - 如何使用容器的 dockerpy 获取主机地址?