Use system python in homebrew
Question: Is it possible to use system python in homebrew?

I have python 2.7.5 installed on my mac, but when I try to install any
homebrew package with python in dependencies, it starts loading python 2.7.9.

It is important for me to use system python because of lots of installed
python packages.


Answer: What version of python homebrew uses depends on two things:

  * Where the `python` alias points to.
  * What the python path is in the formula.

In most cases, homebrew forumlae simply use the `python` command, and does not
specify a python path. If it does, then it is usually `/usr/bin/python`.

So, you can fix the problem in two ways:

  * Change the homebrew formulate to point to the right python interpreter of your choice.
  * Change where the `python` command points to.

The first option is problematic, since it means that you need to go into your
`Cellar` folder, and alter things. This is not nice, and usually not required.

A better alternative is to point to the right `python` command. This is where
`pyenv` comes in handy. `pyenv` is a command line tool that helps you manage
different versions of python. Follow the instructions here:

<https://github.com/yyuu/pyenv-installer>

to install it.

Once that is done, change your `python` command to whatever version of python
you'd like it to point to.

