Installation instructions#
AutoEmulate
is a Python package that can be installed in a number of ways.
In this section we will describe the main ways to install the package.
For new users, we recommend installing the package from PyPI.
For users who want to contribute to the package, we recommend using Poetry to install the package from the source code.
Prerequisites#
Python Version: AutoEmulate
requires Python >=3.10
and <3.13
.
Install from PyPI#
To get the latest release from PyPI:
pip install autoemulate
Install using Poetry#
If you’d like to contribute to AutoEmulate
, you can install the package using Poetry.
Ensure you have poetry installed. If not, install it following the official instructions. This has been most recently tested with Poetry version
2.1
.Fork the repository on GitHub by clicking the “Fork” button at the top right of the AutoEmulate repository
Clone your forked repository:
git clone https://github.com/YOUR-USERNAME/autoemulate.git
Navigate into the directory:
cd autoemulate
Set up poetry:
poetry install
Create a virtual environment:
poetry env activate
Then activate the virtual environment using the command displayed by the previous command. This will be something like:
source /Users/yourName/Library/Caches/pypoetry/virtualenvs/autoemulate-l4vGdsmY-py3.11/bin/activate
Interactive tutorials#
You can run the Quickstart demo and other interactive tutorials fron the documentation locally. The examples are all Jupyter notebooks and can be run in your favoured method, such as JupyterLab, Jupyter Notebook, or VS Code.
These steps will guide you in the simplest way to set up a virtual environment, install the package from PyPI and run the notebooks with JupyterLab.
Clone the AutoEmulate repository:
git clone https://github.com/alan-turing-institute/autoemulate
Navigate into the directory:
cd autoemulate
Set up a virtual environment called
autoemulate
:python -m venv autoemulate
Activate the virtual environment:
On Windows:
autoemulate\Scripts\activate
On macOS/Linux:
source autoemulate/bin/activate
Install the package from PyPI:
pip install autoemulate
Install JupyterLab:
pip install jupyterlab
Create a Jupyter kernel for the virtual environment:
python -m ipykernel install --user --name autoemulate --display-name "Python (autoemulate)"
This command registers the virtual environment as a Jupyter kernel named
Python (autoemulate)
, which you can select in JupyterLab.Launch JupyterLab:
jupyter lab
Open the
docs/getting-started/quickstart.ipynb
notebook in JupyterLab.Set the kernel to use the
Python (autoemulate)
kernel you created earlier. You can do this by clicking on the kernel name in the top right corner of the JupyterLab interface and selectingPython (autoemulate)
from the dropdown menu.Find other interactive tutorials in the
docs/tutorials
directory, which you can open and run in JupyterLab.