- 更新openpyxl版本
命令如下:
pip install --upgrade openpyxl
或者
pip install -U openpyxl
命令执行后,将openpyxl 2.5.12升级为2.5.14
- 更新pip版本
pip install --upgrade pip
pip install -U pip
或者用Python命令参数-m选项来安装也是可以的,-m的意思是用Python解释器来运行pip再更新,Python更新pip命令如下:
python -m pip install --upgrade pip
python -m pip install -U pip
运行结果:
Collecting pip
Downloading https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 119kB/s
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Successfully installed pip-19.0.1