Installation#

conda#

The same conda-forge package installs into a conda environment:

conda create -n geconpy -c conda-forge python=3.12 geconpy
conda activate geconpy

pip#

gEconpy is also on PyPI. Install pytensor from conda-forge first, then gEconpy with pip:

conda create -n geconpy -c conda-forge python=3.12 pytensor
conda activate geconpy
pip install gEconpy

Installing straight from PyPI into a plain virtual environment also works, but pytensor then needs a C compiler on the system path to compile models.

Development installation#

The repository is itself a pixi workspace. From a clone, pixi install creates an environment from the committed lock file, holding the runtime, test, and documentation dependencies plus gEconpy in editable mode. pixi shell activates it:

git clone https://github.com/jessegrabowski/gEconpy.git
cd gEconpy
pixi install
pixi shell

The workspace defines tasks for the common jobs, which run without activating a shell:

pixi run test                # the test suite, extra pytest arguments pass through
pixi run lint                # every pre-commit hook on every file
pixi run docs-build          # the documentation, into docs/build/html

For conda directly, conda_envs/environment_dev.yml is the same environment exported from the pixi workspace. Its pip section installs gEconpy in editable mode from ., so run the command from the repository root:

conda env create -f conda_envs/environment_dev.yml
conda activate geconpy-dev