Problem
A tweet reads:
Why should you use pip instead of easy install? Isn’t it largely PyPI and package authors that are to blame? Both pip and easy install will fail if an author uploads a bad source tarball to PyPI (e.g., missing files, no setup.py). Why, aside from cosmetic differences, do Python users (as in the following tweet) appear to prefer pip over easy install?
(Let’s suppose we’re talking about the community-maintained easy install package from the Distribute package.)
Asked by Sridhar Ratnakumar
Solution #1
The following is an excerpt from Ian Bicking’s introduction to pip:
Answered by Daniel Roseman
Solution #2
For 2015, several of the answers are out of current (although the initially accepted one from Daniel Roseman is not). Here’s how things are right now:
Only the unusual scenario of using Apple’s pre-installed Python versions with OS X 10.5-10.8 is a good reason to utilize easy install in 2015. Apple has implemented easy install since 10.5, however pip is still missing in 10.10. You should still use get-pip.py with 10.9+, but for 10.5-10.8, this has some issues, therefore sudo easy install pip is easier. (In general, easy install pip is a horrible idea; you only want to do this for OS X 10.5-10.8.) Also, 10.5-10.8 contain readline in a way that easy install understands but pip does not, so if you wish to upgrade that, you should also sudo easy install readline.
Answered by abarnert
Solution #3
Another reason to prefer pip is that it is the new hotness and will continue to be utilized in the future, as yet unmentioned.
The infographic below—from the Current State of Packaging section in the The Hitchhiker’s Guide to Packaging v1.0—shows that setuptools/easy_install will go away 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.
Answered by Matthew Rankin
Solution #4
There are at least two explanations, and there may be more:
Answered by Ned Batchelder
Solution #5
REQUIREMENTS files.
Seriously, I use this every day in conjunction with virtualenv.
FOLKS, QUICK DEPENDENCY MANAGEMENT TUTORIAL
Requirements files let you take a snapshot of all the packages you’ve installed with pip. You can have your codebase function off a very particular collection of packages and share that codebase with others by enclosing those packages in a virtualenvironment.
According to Heroku’s documentation https://devcenter.heroku.com/articles/python
You establish a virtual environment and specify that it be used by your shell. (instructions for bash/*nix)
virtualenv env
source env/bin/activate
All python programs launched with this shell will now use the packages and configuration of this environment. You can now install a package locally to this environment rather than globally on your machine.
pip install flask
You can now dump the information about which packages have been installed.
pip freeze > requirements.txt
If you checked that file into version control, anyone who downloads your code can create their own virtual environment and install all of the dependencies with:
pip install -r requirements.txt
It’s always great when you can automate tedium like this.
Answered by Matthew Schinckel
Post is based on https://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install