python - working - Why use pip over easy_install?
python-m pip install (6)
Another—as of yet unmentioned—reason for favoring pip is because it is the new hotness and will continue to be used in the future.
Here's another infographic from distribute's documentation showing that Setuptools and easy_install will be replaced by the new hotness—distribute and pip. While pip is still the new hotness, Distribute merged with Setuptools in 2013 with the release of Setuptools v0.7.
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)
As an addition to fuzzyman's reply:
pip won't install binary packages and isn't well tested on Windows.
As Windows doesn't come with a compiler by default pip often can't be used there. easy_install can install binary packages for Windows.
Here is a trick on Windows:
you can use
easy_install <package>to install binary packages to avoid building a binary
you 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
I will ask on the mailing list what is planned for that.
Here is the latest update:
The new supported way to install binaries is going to be
It is not yet in the standard, but almost. Current version is still an alpha: 1.0.0a1
I will test
wheel by creating an OS X installer for
wheel 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 supporting
I promised to build wheels for
PySide, and I did that last summer. Works great!
A few developers failed so far to support the wheel format, simply because they forget to
Often, it is easy to convert such packages by replacing this single word in
Just met one special case that I had to use
easy_install instead of
pip, or I have to pull the source codes directly.
For the package
GitPython, the version in
pip is too old, which is
0.1.7, while the one from
easy_install is the latest which is
Python 2.7.8. I'm not sure about the underlay mechanism of
pip, but at least the versions of some packages may be different from each other, and sometimes
easy_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:
- Binary packages are now distributed as wheels (
.whlfiles)—not just on PyPI, but in third-party repositories like Christoph Gohlke's Extension Packages for Windows.
pipcan handle wheels;
- Virtual environments (which come built-in with 3.4, or can be added to 2.6+/3.1+ with
virtualenv) have become a very important and prominent tool (and recommended in the official docs); they include
pipout of the box, but don't even work properly with
distributepackage that included
easy_installis no longer maintained. Its improvements over
setuptoolsgot merged back into
setuptools. Trying to install
distributewill just install
easy_installitself is only quasi-maintained.
- All of the cases where
pipused to be inferior to
easy_install—installing from an unpacked source tree, from a DVCS repo, etc.—are long-gone; you can
pip install .,
pip install git+https://.
pipcomes with the official Python 2.7 and 3.4+ packages from python.org, and a
pipbootstrap is included by default if you build from source.
- The various incomplete bits of documentation on installing, using, and building packages have been replaced by the Python Packaging User Guide. Python's own documentation on Installing Python Modules now defers to this user guide, and explicitly calls out
pipas "the preferred installer program".
- Other new features have been added to
pipover the years that will never be in
easy_install. For example,
pipmakes 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 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.
Two reasons, there may be more:
pip provides an
if an installation fails in the middle, pip will leave you in a clean state.
setuptools has absorbed
distribute as opposed to the other way around, as some thought.
setuptools is up-to-date with the latest
distutils changes and the wheel format. Hence,
pip are more or less on equal footing now.