Skip to content

Installation Guide (Windows)

Ricardo Vieira edited this page May 18, 2022 · 49 revisions

PyMC Installation on Windows

The following instructions rely on having Anaconda, Mamba or Miniforge installed, which provide Python environments from which you can install and run PyMC in a controlled way, using the conda utility.

Prior to installing PyMC, also ensure that you have C/C++ compilers installed on your system. If you have Visual Studio already installed then you likely already have these. Otherwise, installing a recent version of MinGW (11.2.0 or greater) will provide the necessary compilers. An easy way to do this (though not the only way) is via the Chocolatey package manager:

choco install mingw

Then, installing PyMC under Windows is a two-step process, with conda being used to set up an environment and then pip to install PyMC itself. Using conda allows Aesara and PyMC to easily access MKL.

It is usually a good idea to install into a fresh conda environment, which we will call pymc_env:

conda create -n pymc_env -c conda-forge python libpython mkl-service numba python-graphviz scipy arviz

Next, PyMC can be installed into the environment we have created:

conda activate pymc_env
pip install pymc --pre

Until v4 is officially released, you will need to add the --pre flag as shown to get the correct version. If you are looking for PyMC3, then replace the above with pip install pymc3.

JAX sampling

JAX is not directly supported on Windows systems at the moment.