Today's tutorial and dependencies will be provided in Google Colab
This requires a Google account, allowing you to save a copy of the notebook to your personal Google Drive.
Tutorial link: bit.ly/pyladiesstan3
However, if you prefer to work locally on your machine, here are steps to install CmdStanPy and tutorial requirements:
- Navigate to a desired directory
git clone https://github.com/nyc-pyladies/2019-cmdstanpy-bayesian-workshop.git
cd 2019-cmdstanpy-bayesian-workshop/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
In order to use CmdStanPy, we need to install the shell interface to Stan using CmdStan
CmdStanPy provides a script to perform this install.
- Install using either:
curl -o install_cmdstan.py https://raw.githubusercontent.com/stan-dev/cmdstanpy/master/bin/install_cmdstan
or
wget -O install_cmdstan.py https://raw.githubusercontent.com/stan-dev/cmdstanpy/master/bin/install_cmdstan
(This may take a few minutes to install)
Take note of the install directory, as well as the install version. You should see the following logged in the first couple of lines from installation:
Install directory: /Users/(your username)/.cmdstanpy
Downloading CmdStan version 2.20.0
- Set environment variable for
CMDSTAN
export CMDSTAN='/Users/(your username)/.cmdstanpy/cmdstan-2.20.0'
(The path and cmdstan version should match the log output from Step 6)
- Run
jupyter notebook
- Navigate to tutorial in
notebooks/WWC2019.ipynb