Python 2.7.10 comes packages with OS X El Capitan. To install the latest version from homebrew:
brew install python
# pip and setuptools are already installed
pip install --upgrade pip setuptools
# Install virtualenv
pip install virtualenv
Scikit learn
pip install -U scikit-learn
brew install homebrew/python/numpy
brew install homebrew/python/scipy
Numpy depends on gcc, and if it isn’t installed, homebrew will try to download and compile it from source, which could take an hour or more to compile.
Flask
sudo easy_install pip
brew install python
pip install virtualenv
mkdir foo-project
cd foo-project
virtualenv venv
. venv/bin/activate
python app.py
Numpy
- Guide to Numpy [PDF] by Travis E. Oliphant