Python笔记——更新pip时遇到traceback(most recent call last)错误以及error: The read operation timed out解决方法

笔者在拷贝网上代码学习时,发现有个模块没有,于是去pip,可是由于pip版本是老版本,提示我更新,于是就开始了pip 更新的崎岖历程,在网上找了很多很多博客,都不能成功,总是下载一半,就报错。

Python笔记——更新pip时遇到traceback(most recent call last)错误以及error: The read operation timed out解决方法_第1张图片

偶然间,找到了一句更新命令:

easy_install --upgrade pip

于是就拿着去试,不过也是不行,但是与其他命令返回的错误信息不同的是,此命令的error信息为:

The read operation timed out

搜索后发现原来是国外的网站,访问超时的原因。之后就加入了国内源,完美更新成功,指令如下:

easy_install -i https://pypi.doubanio.com/simple/ --upgrade pip

成功截图:

Python笔记——更新pip时遇到traceback(most recent call last)错误以及error: The read operation timed out解决方法_第2张图片

 升级方法第二种:

此方法针对于 升级pip出现sslError 时使用,其中lightgbm是你想要安装的包

pip install lightgbm -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

 

你可能感兴趣的:(Python笔记——更新pip时遇到traceback(most recent call last)错误以及error: The read operation timed out解决方法)