【转】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

上一篇:华为云建站怎么样


下一篇:【上电即上华为云】华为云openCPU智联模组_wifi_8720_MQTT