Skip to content

Installation Guide (Windows)

Thomas Wiecki edited this page Jun 10, 2022 · 49 revisions

Alert: Security incident

If you are a Windows user who downloaded Anaconda or Miniforge in the days between 2022-06-06 to 2022-06-08 by clicking on the links on our Wiki installation page: https://github.com/pymc-devs/pymc/wiki/Installation-Guide-(Windows), your system might be compromised.

For more information, please read https://github.com/pymc-devs/pymc/wiki/Security-incident-2022-06-08:-Anaconda-installer-on-Windows-installation-page:-Anaconda-installer-on-Windows-installation-page

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.

Simple Install

The Simple Install process for PyMC under Windows is recommended for most users, with conda being used to set up an environment that contains required dependencies, including the GCC compiler toolchain. Using conda allows Aesara and PyMC to easily access MKL and also confines the install of the GCC compiler toolchain into the conda environment rather than placing it onto the global Windows PATH.

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 "pymc>=4.0"

Next, you can activate the environment in which you just installed PyMC.

conda activate pymc_env

Fancy Install

The Fancy Install of PyMC is for those who would prefer to manage the GCC compiler installation on their own rather than rely on conda to do it. You can install an up-to-date copy of GCC yourself and make sure it is available on the global Windows PATH. An easy way to do this (though not the only way) is via the Chocolatey package manager:

choco install mingw

Once GCC installation has completed, you can then pickup the creation of a conda environment as described above, replacing the conda environment creation command with this one, which omits the m2w64-toolchain:

conda create -n pymc_env -c conda-forge pymc-base libpython mkl-service numba

JAX sampling

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