问题二:安装python -m pip install openpyxl 类库报错,A new release of pip available: 22.2.2 -> 22.3.1 【问题描述】安装python -m pip install openpyxl 类库报错,A new release of pip available: 22.2.2 -> 22.3.1 (venv) D:\learnworkspace\python-learn\python-base>python -m pip install openpyxl Collecting openpyxl Downloading openpyxl-3.0.10-py2.py3-none-any.whl (242 kB) ---------------------------- ----------- 174.1/242.1 kB 33.8 kB/s eta 0:00:03 ERROR: Exception: Traceback (most recent call last): File "\site-packages\pip\_vendor\urllib3\response.py", line 435, in _error_catcher yield TimeoutError: The read operation timed out [notice] A new release of pip available: 22.2.2 -> 22.3.1 [notice] To update, run: python.exe -m pip install --upgrade pip |
【解决思路】 按照[notice]提示更新pip,run: python.exe -m pip install --upgrade pip,更新后仍然报错。因此怀疑是upgrade pip本身造成的影响。 |
【具体步骤】 1、进入Lib\site-packages\ 看到pip-22.2.2.dist-info目录,删除此目录后 2、重新下载插件python -m pip install openpyxl 问题解决,显示如下: >python -m pip install openpyxl Collecting openpyxl Downloading openpyxl-3.0.10-py2.py3-none-any.whl (242 kB) ---------------------------------------- 242.1/242.1 kB 8.0 kB/s eta 0:00:00 Collecting et-xmlfile Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB) Installing collected packages: et-xmlfile, openpyxl Successfully installed et-xmlfile-1.1.0 openpyxl-3.0.10 |
来源地址:https://blog.csdn.net/srliuyy/article/details/128181725