1

Every time I tried to install a new package for python on Mac OS X, I had this issue which these packages had different ways to setup with different package management tools. Specially for new versions of Mac OS X 10.9 Mavericks, some of installers are buggy, then I needed to switch between them. I'm asking for a short description and comparison between these main command-line installers: easy_install, pip, port, apt-get, brew, fink, and etc. Of course, sometimes there is no way other than installing through source code make install, python setup.py, or .pkg installer files. But I guess that's not the case when you need to install more complicated packages with lots of dependencies.

What I'm asking has two sides:

  1. Is it safe to use them side by side? or are there any known conflicts between these command-line tools? (at least brew throws warnings on port availability)
  2. Is there any known cons and pros based on nature of these package managements, in case when we had choice between them?
Mehdi
  • 4,202
  • 5
  • 20
  • 36
  • it is usually recommended that you don't use two package managers side by side. I usually just stick with `pip` – inspectorG4dget Jan 22 '14 at 17:41
  • It is known that it's really better to use Pip over easy_install as you can see [here](http://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install). Another good practice is to use virtual env and pip together to avoid conflicts between differents projects. For Python projects, you don't need something else. – David Dahan Jan 22 '14 at 18:05
  • What about port? sometimes there are packages on https://pypi.python.org but you cannot install it with pip. or sometimes you need to use `port` with different package names. Or you find `apt-get` working for linux but same package has different name on Mac's `apt-get`. – Mehdi Jan 22 '14 at 18:08
  • I have also more specific questions about installers: http://stackoverflow.com/questions/21290751/installing-matplotlib-on-mac-os-x-10-9 – Mehdi Jan 22 '14 at 18:17

1 Answers1

0
  1. pip and easy_install are for python libraries.
  2. apt-get, brew, fink, port, etc. These tools are 'distro style' package management tools.

They have one area of overlap in terms of 'why do i need one of each?' and that is Library dependencies.

pip is the tool endorsed by the most python developers and the python packaging SIG going forward, so TLDR; use pip not easy_install

these tools also work with virtualenvs and virtualenvs are great. use them :)

You will however run into occasions where you need other libraries that python doesnt quite know what to do with when you try and build a python package with pip. It is these moments that make it necessary to have one of the other tools.

Techdragon
  • 502
  • 8
  • 15