背景
在windows的命令行下使用pip安装python各种库很便利,但有时下载包会出现这种问题
socket.timeout: The read operation timed out
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
或是这样的升级提示
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the ‘python -m pip install –upgrade pip’ command.
问题
尝试用 python -m pip install –upgrade pip 升级,但报错
AttributeError: 'NoneType' object has no attribute 'bytes'
并仍有上面的升级提示;
尝试其他人说的 pip3 install –upgrade pip 升级,依然有这个错误;
······
我的问题是,电脑装了Python2.7和Python3.5两个版本,并曾把二者都放到系统环境下,改配置,python运行3.5,python2运行2.7,pip运行pip2,pip3运行pip3。所以会出现以下问题。(自