如何从虚拟环境内部更新点子本身? [英] How do I update pip itself from inside my virtual environment?

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

问题描述

我可以更新点子管理的软件包,但是如何更新点子本身?根据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.

命令是什么?我是否需要使用distribute,或者是否有本机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

这篇关于如何从虚拟环境内部更新点子本身?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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