Why use pip over easy_install?
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)
pip vs easy_install, that lets you automatically download, build, install, and manage Python packages. 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
Easy Install, looks in the Python Package Index (PyPI) for the desired packages and uses the metadata there to download and install the package and its dependencies. If any new package is being installed, pip keeps track of why that package was required. In pip the code is relatively concise and cohesive, making it easier to use programmatically. Pip has another advantage over easy_install which is native support for other version control systems (Git, Mercurial, and Bazaar)
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.
Python : Easy_Install Package Manager, A tweet reads Dont use easy_install unless you like stabbing yourself in the face Use pipWhy use pip over easy_install Doesnt the fa 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. 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.
Two reasons, there may be more:
pip provides an
if an installation fails in the middle, pip will leave you in a clean state.
Why use pip over easy_install?, Reasons why a pip is used over easy install:- Originally pip was written to improve on easy_install by following ways:- In pip, all packages are 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.
Seriously, I use this in conjunction with virtualenv every day.
QUICK DEPENDENCY MANAGEMENT TUTORIAL, FOLKS
Requirements files allow you to create a snapshot of all packages that have been installed through pip. By encapsulating those packages in a virtualenvironment, you can have your codebase work off a very specific set of packages and share that codebase with others.
From Heroku's documentation https://devcenter.heroku.com/articles/python
You create a virtual environment, and set your shell to use it. (bash/*nix instructions)
virtualenv env source env/bin/activate
Now all python scripts run with this shell will use this environment's packages and configuration. Now you can install a package locally to this environment without needing to install it globally on your machine.
pip install flask
Now you can dump the info about which packages are installed with
pip freeze > requirements.txt
If you checked that file into version control, when someone else gets your code, they can setup their own virtual environment and install all the dependencies with:
pip install -r requirements.txt
Any time you can automate tedium like this is awesome.
Why use pip over easy_install?, pip was originally written to improve on easy_install in the following at gp.recipe.pip as an option to use pip and virtualenv in your buildouts. pip came later in 2008, as alternative to easy_install, although still largely built on top of setuptools components. It was notable at the time for not installing packages as Eggs or from Eggs (but rather simply as ‘flat’ packages from sdists ), and introducing the idea of Requirements Files, which gave users the power to easily replicate
Python: What's PyPi, pip, easy_install, setuptools?, Instead use pip. Note that the instructions on the setuptools PyPI page assume that you are are installing to Python's primary site-packages (And, on Windows, you should not use the .exe installer when installing to an alternate location.). $ easy_install pyobjc-core pyobjc error: Setup script exited with error: This distribution is only supported on MacOSX versions 10.6 upto and including 10.8 easy_install은 OSX 10.10 대응이 되지 않고, $ pip install pyobjc pip can't proceed with requirement 'pyobjc-framework-Message==3.0.3 (from pyobjc)' due to a pre-existing build directory.
pip install, Concurrent use of the environment during the install is more likely to work. to setuptools, giving up pip's ability to enforce any of the above. easy_install. 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.
pip · PyPI, You can use pip install --upgrade SomePackage to upgrade to a newer pip is a replacement for easy_install. It uses pip is meant to improve on easy_install. easy_install and pip are python package installers that will make your life a lot easier when developing in python. These steps assume you already have python installed and that python is in your windows environment variables. Download setup-tools according to your python version.