为什么说推荐用pip而不是easy_install?

Python中安装一个Package的时候就可以使用pip,又可以使用easy_install,为什么有人说推荐用pip而不是easy_install呢?按我说,至少pip只有敲三个字母就好了。

A tweet reads:
Why use pip over easy_install? Doesn’t the fault lie with PyPI and package authors mostly? If an author uploads crap source tarball (eg: missing files, no setup.py) to PyPI, then both pip and easy_install will fail. Other than cosmetic differences, why do Python people (like in the above tweet) seem to strongly favor pip over easy_install?
(Let’s assume that we’re talking about easy_install from the Distribute package, that is maintained by the community)

Many of the answers here are out of date for 2015 (although
is not). Here’s the current state of things:
The only good reason that I know of to use

easy_install

in 2015 is the special case of using Apple’s pre-installed Python versions with OS X 10.5-10.8. Since 10.5, Apple has included

easy_install

, but as of 10.10 they still don’t include

pip

. With 10.9+, you should still just use

get-pip.py

, but for 10.5-10.8, this has some problems, so it’s easier to

sudo easy_install pip

. (In general,

easy_install pip

is a bad idea; it’s only for OS X 10.5-10.8 that you want to do this.) Also, 10.5-10.8 include

readline

in a way that

easy_install

knows how to kludge around but

pip

doesn’t, so you also want to

sudo easy_install readline

if you want to upgrade that.

原文:https://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install

By Code问答

发表评论

电子邮件地址不会被公开。 必填项已用*标注

75 + = 77