如何从我的虚拟环境中更新\升级 pip 本身? [英] How do I update\upgrade pip itself from inside my virtual environment?
问题描述
我可以更新 pip 管理的软件包,但我如何更新 pip 本身?根据 pip --version
,我目前在我的 virtualenv 中安装了 pip 1.1,我想更新到最新版本.
I'm able to update pip-managed packages, but how do I update pip itself? According to pip --version
, I currently have pip 1.1 installed in my virtualenv and I want to update to the latest version.
那个命令是什么?我需要使用分发还是有本地 pip 或 virtualenv 命令?我已经尝试过 pip update
和 pip update pip
没有成功.
What's the command for that? Do I need to use distribute or is there a native pip or virtualenv command? I've already tried pip update
and pip update pip
with no success.
推荐答案
pip
只是一个 PyPI 包 像其他任何东西一样;您可以像升级任何软件包一样使用它来升级自身:
pip
is just a PyPI package like any other; you could use it to upgrade itself the same way you would upgrade any package:
pip install --upgrade pip
在 Windows 上,推荐的命令是:
On Windows the recommended command is:
python -m pip install --upgrade pip
这篇关于如何从我的虚拟环境中更新\升级 pip 本身?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!