Skip to content

Installation Guide (Windows)

Chris Fonnesbeck edited this page Oct 27, 2021 · 49 revisions

PyMC v3 Installation on Windows

The essence of a solid PyMC3 installation on Windows is to install most of the dependencies through conda. The reason installation via PyPI is difficult is that Theano/Aesara require compilation against MKL, which is difficult to set up, while Conda comes with its own compilers and MKL installation.

⚠ Do not pip install without first installing dependencies with conda. ⚠

Run conda env create -f environment.yml to create a fresh environment in one step.

environment.yml
name: pm3env
channels:
  - conda-forge
  - defaults
dependencies:
  - libpython
  - mkl-service
  - m2w64-toolchain
  - numba
  - pip
  - python=3.8
  - python-graphviz
  - scipy
  - pip:
    - pymc3

Alternatively you can use the following command:

conda create -n pm3env -c conda-forge "python=3.8" libpython mkl-service m2w64-toolchain numba python-graphviz scipy

After that, PyMC3 can be installed with

pip install pymc3

Developer Installation

If you want to tinker with PyMC3 itself, first clone the repository and then make an "editable" installation:

git clone https://github.com/pymc-devs/pymc3/
cd pymc3
pip install --editable .

Upgrading from Theano to Theano-PyMC

If you have the original Theano installed, please remove it and install Theano-PyMC via Conda Forge:

conda remove theano
conda install -c conda-forge theano-pymc

PyMC v4 Installation Instructions

TBA

Clone this wiki locally