Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use pip over easy_install? [closed]

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)

like image 310
Sridhar Ratnakumar Avatar asked Jul 10 '10 18:07

Sridhar Ratnakumar


People also ask

Why do we use pip?

pip is a recommended tool for installing Python packages. For example, if you need to install an external package/library, say requests, you have to install it first using pip.

What does easy_install do?

Distributes Python programs and libraries (based on the Python Eggs wrapper) It's a python module (easy_install) that is bundled with setuptools. It lets you automatically download, build, install, and manage Python packages.

Does pip require setuptools?

Majority of users who install pip will get setuptools by default. Users can explicitly uninstall setuptools after installing pip or exclude setuptools when installing pip.


1 Answers

From Ian Bicking's own introduction to pip:

pip was originally written to improve on easy_install in the following ways

  • All packages are downloaded before installation. Partially-completed installation doesn’t occur as a result.
  • Care is taken to present useful output on the console.
  • The reasons for actions are kept track of. For instance, if a package is being installed, pip keeps track of why that package was required.
  • Error messages should be useful.
  • The code is relatively concise and cohesive, making it easier to use programmatically.
  • Packages don’t have to be installed as egg archives, they can be installed flat (while keeping the egg metadata).
  • Native support for other version control systems (Git, Mercurial and Bazaar)
  • Uninstallation of packages.
  • Simple to define fixed sets of requirements and reliably reproduce a set of packages.
like image 174
Daniel Roseman Avatar answered Sep 28 '22 18:09

Daniel Roseman