PyMC is a nice Python package for implementing MCMC sampling in Bayesian inference. I have used this package on a variety of projects in Ubuntu 10.04lts and will provide my notes on how to install the development version from the github repository. This is important for me because I have found a variety of instances where I needed the latest PyMC version to accomplish particular goals.
第一种:
To start, make sure some dependencies are installed:
1 |
|
If, like me, you already have many Python packages installed you will have some or most of the above installed. Next, cd to a directory where you would like to keep the PyMC git repository on your machine and clone the repository:
1 |
|
Finally, compile and install
1 2 3 |
|
第二种:
sudo
apt-get
install
python-dev
gcc
gfortran
pip install pymc