报错如下:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutEr ror(“HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out. (read timeout=15)”)’: /packages/50/c2/e06851e8cc 28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl
解决方法:
先检查自己的pip是否安装成功,若是成功,则可运行如下代码:
pip install 包 -i http://pypi.douban.com/simple
若是使用上述方法仍然报错,则:
pip install [whatyouwant] -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
此处,在pip安装命令后面加上-i http://mirrors.aliyun.com/pypi/simple/ ,链接还可以换成其他国内镜像链接:
- 阿里云:http://mirrors.aliyun.com/pypi/simple/ (推荐使用)
- 清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
- 豆瓣:http://pypi.douban.com/simple/