【转】Python PIP 升级到 20.2.3后 无法使用PyPI华为镜像

请参考:https://bbs.huaweicloud.com/suggestion/detail/105449

问题描述

PIP升级到20.2.3后,当安装软件时会报这个错误

WARNING: Skipping page https://mirrors.huaweicloud.com/repository/pypi/simple/pandas/ because the GET request got Content-Type: application/octet-stream.The only supported Content-Type is text/html

ERROR: Could not find a version that satisfies the requirement pandas (from versions: none)

ERROR: No matching distribution found for pandas

 

解决办法

将pip.conf文件修改为http协议就好了
cat pip.conf
[global]
index-url = http://mirrors.huaweicloud.com/repository/pypi/simple
trusted-host = mirrors.huaweicloud.com
timeout = 120

posted on 2021-01-19 17:24  东西南北风  阅读(506)  评论(0编辑  收藏  举报

导航