Skip to content

PCNtoolkit from Windows

Konstantinos Tsilimparis edited this page May 18, 2026 · 1 revision

PCNtoolkit supports Linux and MacOS. If you have Windows please install WSL.

If you are not able to install WSL, there is still possibility to contribute from Windows:

1.1 Install g++ compiler

conda install -c conda-forge m2w64-toolchain libpython

These are required to compile C/C++ extensions when you run a Hierarchical Bayesian Regression (HBR) model.

1.2 Install BLAS (OPTIONAL1)

BLAS (Basic Linear Algebra Subprograms) provides optimized routines for matrix and vector operations and can help speed up the HBR.

Install OpenBLAS into your active conda environment:

conda install -c conda-forge openblas

This places two files in your environment:

  • <env>/Library/lib/openblas.lib - import library, used at link time
  • <env>/Library/bin/openblas.dll - shared library, loaded at runtime

Then link pytensor to use BLAS

import sys
import os
from pytensor.configdefaults import config

# sys.prefix returns the root directory of the currently active python environment
conda_lib_path = os.path.join(sys.prefix, "Library", "lib")
config.blas__ldflags = f"-L{conda_lib_path} -lopenblas"

2. Installing Make on Windows

Windows does not come with Make pre-installed. Setting it up manually can be complicated, so we generally do not recommend using it directly on Windows. But if you still want to use Make, the easiest way is via Git Bash. Here's how to install it for Git Bash:

Step 1: Download Make

  1. Go to ezwinports on SourceForge
  2. Download make-4.4.1-without-guile-w32-bin.zip (or newest version without guile)

Step 2: Install to Git

  1. Extract the downloaded zip file
  2. Find your Git installation folder (usually C:\Users\YourUsername\AppData\Local\Programs\Git\)
  3. Copy the contents of the extracted folders into Git\mingw64\:
    • bin\Git\mingw64\bin\
    • include\Git\mingw64\include\
    • lib\Git\mingw64\lib\
    • share\Git\mingw64\share\

Step 3: Verify Installation in Git Bash

make --version

Step 4: Initialise conda in Git Bash to be able to use it

conda init bash

Note: If this does not work, you can manually add the conda initialize block shown below to your ~\.bash_profile:

# >>> conda initialize >>>
. /c/Users/kontsi/AppData/Local/anaconda3/etc/profile.d/conda.sh
# <<< conda initialize <

1 We have not seen improvements in the speed of HBR with BLAS

Clone this wiki locally