Search code examples
pythonmacosmacportshomebrew

Macports duplicate packages


I have already Python 2.7 on my Mac Os 10.7 and i tried to install py27-mysql package that contains MySQLdb interface for Python. I had run sudo ports install py27-mysql and macports began to install all dependencies for that package python2.7, mysql5, etc that I already has.

Now the questions:

  1. Why that happens?
  2. Where is now native Mac Os python and mysql?
  3. Which one I use after installation if I work from command shell?
  4. Is brew better?

Solution

  • Macports installs the packages in /opt/local/ and /opt/local/bin.

    You can always find your default OS package installation in /bin and /usr/bin.

    OS default python installation: /usr/bin/python

    Of course, you can choose the macports by having /opt/local/bin first in your path. Macport installation works very well for me.