Windows Installation Guide for PandExo

Created by J. N. van Haastere (Physics and Astronomy bachelor’s student), University of Amsterdam and VU University Amsterdam.

Step 1: Install Conda

Create a dedicated conda environment; uninstalling other Python versions is not necessary.

Download most recent Anaconda version. Miniconda is sufficient. PandExo requires Python 3.10 or later; continuous integration currently tests Python 3.10 through 3.12, while Python 3.13 is also exercised as a non-blocking compatibility check.

Step 2: Create an Environment

Install Anaconda or Miniconda, then create and activate an environment:

conda create -n pandexo python=3.11
conda activate pandexo

Note

Verify that python --version reports Python 3.10 or later.

Step 3: Optional Build Tools

Visual Studio build tools are not normally required. If pip must compile a dependency, install the current Microsoft C++ Build Tools.

Step 4: Download Reference Data

Using an archiver such as 7-Zip, extract the following archives. Keep Pandeia reference data, PSFs, and synphot data in separate locations. The 2026.7 JWST files are available here:

The stellar and normalization archives both extract a grp/redcat/trds tree. PYSYN_CDBS must name the PHOENIX archive’s trds directory, not its parent grp directory. Copy the normalization archive’s comp and mtab contents into the matching directories under that same PYSYN_CDBS directory. Do not nest another grp/redcat/trds tree there.

Step 5: Set Reference-Data Variables

The following PowerShell commands set each variable for the current terminal and persist it for future terminals. Replace the example paths before running them. Start a new PowerShell or Anaconda Prompt after using this step so the persistent values are loaded automatically.

$env:pandeia_refdata = "$HOME\pandexo-data\pandeia_data-2026.7-jwst"
$env:PSF_DIR = "$HOME\pandexo-data\pandeia_psfs-2026.7-jwst"
$env:PYSYN_CDBS = "$HOME\pandexo-data\phoenix\grp\redcat\trds"

[Environment]::SetEnvironmentVariable('pandeia_refdata', $env:pandeia_refdata, 'User')
[Environment]::SetEnvironmentVariable('PSF_DIR', $env:PSF_DIR, 'User')
[Environment]::SetEnvironmentVariable('PYSYN_CDBS', $env:PYSYN_CDBS, 'User')

Copy the normalization comp and mtab contents into PYSYN_CDBS. In this example, $normalizationTrds is the trds directory extracted from the normalization archive:

$normalizationTrds = "$HOME\pandexo-data\normalization\grp\redcat\trds"
New-Item -ItemType Directory -Force "$env:PYSYN_CDBS\comp" | Out-Null
New-Item -ItemType Directory -Force "$env:PYSYN_CDBS\mtab" | Out-Null

Copy-Item -Recurse -Force `
    "$normalizationTrds\comp\*" `
    "$env:PYSYN_CDBS\comp\"

Copy-Item -Recurse -Force `
    "$normalizationTrds\mtab\*" `
    "$env:PYSYN_CDBS\mtab\"

Verify the current terminal’s variables and required files:

$env:pandeia_refdata
$env:PSF_DIR
$env:PYSYN_CDBS
Test-Path $env:pandeia_refdata
Test-Path $env:PSF_DIR
Test-Path "$env:PYSYN_CDBS\comp"
Test-Path "$env:PYSYN_CDBS\grid"
Test-Path "$env:PYSYN_CDBS\mtab"
Test-Path "$env:PYSYN_CDBS\comp\nonhst\bessell_j_003_syn.fits"
Test-Path "$env:PYSYN_CDBS\grid\phoenix\catalog.fits"
(Get-ChildItem "$env:PYSYN_CDBS\mtab" -File -Recurse | Measure-Object).Count -gt 0

For Command Prompt instead of PowerShell, set the current terminal and its persistent replacement separately:

set "pandeia_refdata=C:\Users\USERNAME\pandexo-data\pandeia_data-2026.7-jwst"
setx pandeia_refdata "%pandeia_refdata%"

Repeat the pair of commands for PSF_DIR and PYSYN_CDBS. setx only affects future terminals, so retain set for the current Command Prompt.

Step 6: Install PandExo

python -m pip install pandexo.engine

Confirm that PandExo can see the reference data:

python -c "import pandeia.engine; pandeia.engine.pandeia_version()"

Step 7: Validate the Installation

For a normal pip installation, run this lightweight installed-package smoke test. It does not start the web application or run a simulation:

python -c "import pandexo.engine.justdoit as jdi; mode = jdi.load_mode_dict('NIRSpec Prism'); assert mode['configuration']['instrument']['disperser'] == 'prism'; print('PandExo configuration smoke test passed.')"

To run repository tests, first clone the source checkout and install its test dependencies. This command applies only inside that checkout:

Install Git for Windows to use git clone. Git is not required for a normal pip installation.

git clone https://github.com/natashabatalha/PandExo.git
cd PandExo
python -m pip install -e ".[test]"
python -m pytest tests/test_import.py -q

PandExo is now ready to use. See the example Jupyter notebooks in PandExo/notebooks to get started.