While the accessibility of Bayesian computation has been expanded greatly by software such as BUGS and its cousins, implementing models with such tools can be tricky to code and difficult to debug. Moreover, one often wants to extend or customize the capabilities of Markov chain Monte Carlo (MCMC) samplers to suit the needs of particular problems, which is difficult in most available software. PyMC implements Bayesian statistical models and fitting algorithms, including MCMC, in Python. It offers object-oriented implementations of many samplers, which allows for maximum flexibility and extensibility and and makes it suitable for a wide range of problems. PyMC includes a large suite of well-dcumented statistical distributions, methods for summarizing output and plotting, and a range of goodness-of-fit and convergence diagnostics. Using Python's clean, concise syntax, users can efficiently code a probabilistic model and draw samples from its posterior distribution using MCMC or related techniques. PyMC models can be embedded in larger programs, and results can be analyzed with the full power of Python.