如何从我的虚拟环境中更新/升级 pip 本身? [英] How do I update/upgrade pip itself from inside my virtual environment?

查看:35
本文介绍了如何从我的虚拟环境中更新/升级 pip 本身?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以更新 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 updatepip 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆