问题:
使用pip的时候总是提示:You are using pip version 21.1.2; however, version 22.0.3 is available.
例如
E:\MyProject\pythonProject\venv\Scripts>pip install xlrd1.2.0 Collecting xlrd1.2.0 Downloading xlrd-1.2.0-py2.py3-none-any.whl (103 kB) |████████████████████████████████| 103 kB 163 kB/s Installing collected packages: xlrd Successfully installed xlrd-1.2.0 WARNING: You are using pip version 21.1.2; however, version 22.0.3 is available. You should consider upgrading via the ‘E:\MyProject\pythonProject\venv\Scripts\python.exe -m pip install --upgrade pip’ command.
1.查看当前版本
E:\MyProject\pythonProject\venv\Scripts>pip show pip Name: pip Version: 21.1.2 Summary: The PyPA recommended tool for installing Python packages. Home-page: https://pip.pypa.io/ Author: The pip developers Author-email: distutils-sig@python.org License: MIT Location: e:\myproject\pythonproject\venv\lib\site-packages Requires: Required-by:
2.升级pip
E:\MyProject\pythonProject\venv\Scripts>python -m pip install -U pip Requirement already satisfied: pip in e:\myproject\pythonproject\venv\lib\site-packages (21.1.2) Collecting pip Downloading pip-22.0.3-py3-none-any.whl (2.1 MB) |████████████████████████████████| 2.1 MB 10 kB/s Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 21.1.2 Uninstalling pip-21.1.2: Successfully uninstalled pip-21.1.2 Successfully installed pip-22.0.3
3.查看当前版本
E:\MyProject\pythonProject\venv\Scripts>pip show pip Name: pip Version: 22.0.3 Summary: The PyPA recommended tool for installing Python packages. Home-page: https://pip.pypa.io/ Author: The pip developers Author-email: distutils-sig@python.org License: MIT Location: e:\myproject\pythonproject\venv\lib\site-packages Requires: Required-by:
E:\MyProject\pythonProject\venv\Scripts>
|