Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would a python framework installation guide advise the use of easy_install for some required packages and pip for others?

After a failed attempt at a "streamlined" install of the SimpleCV framework superpack for Windows. I'm now working through a manual installation guide (which I'm OK with as I have more control over the installation and might finally learn about installing Python Packages properly in Windows!)

Rather than just blindly follow the guide I'm trying to understand each step, so I'm confused by this..

 easy_install pyreadline
 easy_install PIL
 easy_install cython
 easy_install pip
 pip install ipython
 pip install https://github.com/ingenuitas/SimpleCV/zipball/1.3

Why not easy_install pip as soon as possible then pip the other packages?..

 easy_install pip     {{{I intend to research and probably use get-pip.py here}}}
 pip install pyreadline        
 pip install PIL
 pip install cython
 pip install ipython
 pip install https://github.com/ingenuitas/SimpleCV/zipball/1.3

Is there a pitfall doing it this way? (My limited understanding is that it's always preferable to use pip rather than easy_install.)

I know this question relates directly to SimpleCV but I want to learn the correct approach for when I'm installing package collections in the future without the benefit of a guide.

like image 557
Richard Plester Avatar asked Apr 07 '13 19:04

Richard Plester


People also ask

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.

How do pip help in efficient management of your Python codes?

The pip command looks for the package in PyPI, resolves its dependencies, and installs everything in your current Python environment to ensure that requests will work. The pip install <package> command always looks for the latest version of the package and installs it.

What is Python M pip install?

PIP is a package management system used to install and manage software packages written in Python. It stands for “preferred installer program” or “Pip Installs Packages.” PIP for Python is a utility to manage PyPI package installations from the command line.


2 Answers

pip fetches the source code of the packages you're trying to install and compiles them. So if you don't have a compiler installed and configured it will fail to do so for packages which contain extensions written in C, which in this case applies to pyreadline, PIL and cython.

easy_install uses the precompiled packages from pypi (at least for windows if they're available), which means you don't need to compile everything yourself.

For pure python packages it's no problem using pip instead of easy_install, and if you have a compiler and the neccessary build dependencies installed it should also work.

like image 127
mata Avatar answered Oct 05 '22 17:10

mata


I believe the answer is that pip does not currently support the installation of binary distributions, i.e. Python packages that include pre-compiled C extension modules. easy_install does.

BTW, there is work afoot to provide replacements for pip (and easy_install) that will fully support binary distributions on all platforms. See here for an overview.

like image 41
Ned Deily Avatar answered Oct 05 '22 18:10

Ned Deily