Session 1: Environment Installation

GDP Growth Nowcasting Workshop — Jamaica

Diego A. Guerrero

2026-05-01

Learning Objectives

  • Install Python 3.11 and Conda (Anaconda distribution)
  • Create and activate the nowcasting conda environment
  • Launch JupyterLab and verify the kernel
  • Install all required packages for the workshop
  • Set up VS Code with Python extension
  • Troubleshoot common installation errors

Python Setup

Why Python?

  • Free and open-source
  • Extensive ecosystem of scientific and data libraries
  • Widely used in central banks, international organisations, and academia
  • Works on Windows, Mac, and Linux
  • Integrates with R, Excel, SQL, and cloud APIs

Install Anaconda

Why: Anaconda bundles Python, conda (environment manager), Jupyter, and the most common data science packages.

Steps

  1. Go to the Anaconda download page and download the Python 3.11 installer for your OS.

  2. Run the installer and follow the prompts (default options are fine).

  3. Open the Anaconda Prompt from the Start Menu.

Verify Installation

Open the Anaconda Prompt and run:

conda --version
python --version
jupyter --version

All three commands should print version numbers without errors.

Two Environments for This Workshop

We need two separate environments because of package conflicts:

nwcst — Nowcasting models

  • numpy, pandas, scikit-learn
  • pmdarima (ARIMA)
  • pytorch + nowcast_lstm
  • camelot-py, PyPDF2

geo — Geospatial / Nighttime Lights

  • geopandas
  • rasterio, h5py
  • folium, fiona, shapely
  • blackmarblepy

Create the nwcst Environment

Open an Anaconda Prompt and run:

conda create -n nwcst python=3.11 pytorch pip numpy pandas matplotlib \
  seaborn scikit-learn tqdm python-dateutil geopandas jupyterlab -y

If pytorch causes errors, create without it first, then add it:

conda create -n nwcst python=3.11 pip numpy pandas matplotlib \
  seaborn scikit-learn tqdm python-dateutil geopandas jupyterlab -y

conda activate nwcst
conda install pytorch torchvision torchaudio cpuonly -c pytorch

Add Extra Packages to nwcst

conda activate nwcst

conda install pip pmdarima -y
pip install nowcast_lstm

If PDF libraries fail:

conda install -y -c conda-forge cryptography openssl cffi pdfminer.six

Create the geo Environment

conda deactivate

conda create -n geo python=3.11 pip numpy pandas matplotlib \
  seaborn tqdm python-dateutil geopandas jupyterlab -y

conda activate geo
conda install rasterio folium mapclassify fiona shapely pyproj h5py -y
pip install blackmarblepy

Launch JupyterLab

conda activate nwcst
jupyter lab

Your browser will open at http://localhost:8888. Create a notebook using the Python 3 (nwcst) kernel.

VS Code Integration

Why VS Code?

  • Run notebooks and scripts side by side
  • GitHub Copilot / AI-assisted coding
  • Integrated terminal — no need to switch windows
  • Extensions for Python, Jupyter, and Git

Setup Steps

  1. Download VS Code from code.visualstudio.com
  2. Install the Python extension (by Microsoft)
  3. Install the Jupyter extension
  4. Select the nwcst interpreter: Ctrl+Shift+PPython: Select Interpreter → choose nwcst

Verify Your Environment

Run the Check Notebook

Open workshop_code/s0_env_check.ipynb and run all cells:

# Utilities
import io, os, re, urllib3, requests, datetime, glob, json
import pandas as pd
import numpy as np
from datetime import date
from bs4 import BeautifulSoup
from dateutil.parser import parse
import xml.etree.ElementTree as ET
from io import BytesIO
import zipfile
import eurostat
import pprint as pp
import logging


# Statistics 
from sklearn import linear_model
import matplotlib.pyplot as plt
import pmdarima as pm
import torch
from nowcast_lstm.LSTM import LSTM
import matplotlib.pyplot as plt
import seaborn as sns

print("All packages loaded successfully!")

All imports should complete without errors.

Expected Output

All packages loaded successfully!

If you see ModuleNotFoundError:

# For conda packages:
conda install <package-name> -y

# For pip-only packages:
pip install <package-name>

Activity

Activity: Environment Check

  1. Open the Anaconda Prompt
  2. Activate the nwcst environment: conda activate nwcst
  3. Test Launching Jupyter: jupyter lab
  4. Run vscode
  5. Open workshop_code/s0_env_check.ipynb
  6. Run all cells — confirm no import errors

Troubleshooting Guide

Error Solution
ModuleNotFoundError: pmdarima conda install pmdarima -y
ModuleNotFoundError: nowcast_lstm pip install nowcast_lstm
Jupyter kernel not found Re-run conda activate nwcst then jupyter lab
VS Code wrong interpreter Ctrl+Shift+P → Python: Select Interpreter