Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

python - 如何从我的虚拟环境中更新pip本身?(How do I update pip itself from inside my virtual environment?)

I'm able to update pip-managed packages, but how do I update pip itself?

(我能够更新pip托管包,但是如何更新pip本身?)

According to pip --version , I currently have pip 1.1 installed in my virtualenv and I want to update to the latest version.

(根据pip --version ,我目前在我的virtualenv中安装了pip 1.1,我想更新到最新版本。)

What's the command for that?

(命令是什么?)

Do I need to use distribute or is there a native pip or virtualenv command?

(我是否需要使用分发或是否有本机pip或virtualenv命令?)

I've already tried pip update and pip update pip with no success.

(我已经尝试了pip updatepip update pip没有成功。)

  ask by zakdances translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

pip is just a PyPI package like any other;

(pip就像其他任何一个PyPI包一样;)

you could use it to upgrade itself the same way you would upgrade any package:

(您可以像升级任何包一样使用它来升级自己:)

pip install --upgrade pip

On Windows the recommended command is:

(在Windows上, 推荐的命令是:)

python -m pip install --upgrade pip

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...