A tweet reads:
Don't use easy_install, unless you like stabbing yourself in the face. Use pip.
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)
Just met one special case that I had to use
easy_install
instead ofpip
, or I have to pull the source codes directly.For the package
GitPython
, the version inpip
is too old, which is0.1.7
, while the one fromeasy_install
is the latest which is0.3.2.rc1
.I'm using
Python 2.7.8
. I'm not sure about the underlay mechanism ofeasy_install
andpip
, but at least the versions of some packages may be different from each other, and sometimeseasy_install
is the one with newer version.Many of the answers here are out of date for 2015 (although the initially accepted one from Daniel Roseman is not). Here's the current state of things:
.whl
files)—not just on PyPI, but in third-party repositories like Christoph Gohlke's Extension Packages for Windows.pip
can handle wheels;easy_install
cannot.virtualenv
) have become a very important and prominent tool (and recommended in the official docs); they includepip
out of the box, but don't even work properly witheasy_install
.distribute
package that includedeasy_install
is no longer maintained. Its improvements oversetuptools
got merged back intosetuptools
. Trying to installdistribute
will just installsetuptools
instead.easy_install
itself is only quasi-maintained.pip
used to be inferior toeasy_install
—installing from an unpacked source tree, from a DVCS repo, etc.—are long-gone; you canpip install .
,pip install git+https://
.pip
comes with the official Python 2.7 and 3.4+ packages from python.org, and apip
bootstrap is included by default if you build from source.pip
as "the preferred installer program".pip
over the years that will never be ineasy_install
. For example,pip
makes it easy to clone your site-packages by building a requirements file and then installing it with a single command on each side. Or to convert your requirements file to a local repo to use for in-house development. And so on.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 includedeasy_install
, but as of 10.10 they still don't includepip
. With 10.9+, you should still just useget-pip.py
, but for 10.5-10.8, this has some problems, so it's easier tosudo 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 includereadline
in a way thateasy_install
knows how to kludge around butpip
doesn't, so you also want tosudo easy_install readline
if you want to upgrade that.As an addition to fuzzyman's reply:
Here is a trick on Windows:
you can use
easy_install <package>
to install binary packages to avoid building a binaryyou can use
pip uninstall <package>
even if you used easy_install.This is just a work-around that works for me on windows. Actually I always use pip if no binaries are involved.
See the current pip doku: http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install
Here is the latest update:
The new supported way to install binaries is going to be
wheel
! It is not yet in the standard, but almost. Current version is still an alpha: 1.0.0a1https://pypi.python.org/pypi/wheel
http://wheel.readthedocs.org/en/latest/
I will test
wheel
by creating an OS X installer forPySide
usingwheel
instead of eggs. Will get back and report about this.cheers - Chris
A quick update:
The transition to
wheel
is almost over. Most packages are supportingwheel
.I promised to build wheels for
PySide
, and I did that last summer. Works great!HINT: A few developers failed so far to support the wheel format, simply because they forget to replace
distutils
bysetuptools
. Often, it is easy to convert such packages by replacing this single word insetup.py
.