

#brew install python3 # repeat/replace the following pip commands with pip3Ī word about brewed python: this is what you want! # and/or if you want to give python3 a go (it's about time):

# set up some taps and update brewīrew tap homebrew/science # a lot of cool formulae for scientific toolsīrew tap homebrew/python # numpy, scipy, matplotlib. In general: execute the following commands one line at a time and read the outputs! If you read some warnings about “keg-only” that’s fine, it just means that brew won’t “hide” your system’s stuff behind the stuff it installed itself so it doesn’t cause problems… brewed stuff will still use it. In this case i can only recommend a backup again). If you don’t have a clean install, some of the following steps might need minor additional attention (like changing permissions chmod, chown, chgrp or overwriting existing files in the linking step with brew link -overwrite package_that_failed. Needless to say: Make a backup (Timemachine)įollow their instructions, then come back here. openblas as Accelerate was fixed in OS X 10.9 It will probably also work in the following versions (if not, let me know in the comments).Īn older version of this setup guide can be found here: Scientific Python on Mac OS X 10.8 with homebrew, main changes: rename of a tap + changes wrt. This step-by-step installation guide to setup a scientific python environment has been tested on Mac OS X Mavericks 10.9 / Yosemite 10.10 / El Capitain 10.11 / Sierra 10.12. The advantages are that this stack will never conflict with your system’s core and homebrew opens up a whole new world of easy to access unix tools via a simple brew install. So here I’ll briefly explain how to set-up a scientific python stack based on homebrew. Also many of the other guides aren’t very easy to extend in “but i also need that library”-cases. So why another one? Cause i found most of the other ways to lead to long-term maintenance debt that is unnecessary and can easily be avoided. There are (too) many guides out there about how to install Python on Mac OS X.
