xxx=包名
常用命令
pip list
pip search xxx
pip install xxx
更新相关
pip list --outdated
pip install --upgrade xxx
升级pip:超时、报错
pip._vendor.urllib3.exceptions.** ReadTimeoutError**:
HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
解决办法:使用国内源(清华镜像)
--临时使用
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
--永久配置
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
文章讲述了在使用pip安装或升级Python包时遇到的超时问题,特别是pipinstall--upgrade命令出现ReadTimeoutError的情况。建议使用国内的清华镜像源来临时或永久解决这个问题,以加快下载速度并避免错误。同时提醒用户检查pip版本,及时升级到最新版本。
422

被折叠的 条评论
为什么被折叠?



