I’ve been working through the following book on Bayesian methods with an emphasis on the pymc library:
However, pymc installation on OS X can be a bit of a pain. The issues comes down to fortran… I know. The version of gfortran in newer gcc implementations doesn’t work well with the pymc build, you need gfortran 4.2, as provided orignally by apple. Homebrew has a package for this.
I dealt with this before, but had problems again after upgrading to Sierra. So this time, I thought I’d document the steps so I don’t have this problem again. Let me know if there are any steps that you feel need added as you try this.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install python3 | |
brew install apple-gcc42 | |
brew unlink gcc | |
ln -sf /usr/local/bin/gfortran-4.2 /usr/local/bin/gfortran | |
#optional: create virtualenv | |
python3 -mvenv ~/venvs/my_venv | |
source ~/venvs/my_venv/bin/activate | |
#end optional | |
pip3 install numpy | |
pip3 install pymc | |
# restore gcc | |
rm /usr/local/bin/gfortran | |
brew link gcc |