|
1 | 1 | # Installation instructions
|
2 | 2 |
|
3 |
| -`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. |
| 3 | +`AutoEmulate` is a Python package that can be installed in a number of ways. |
| 4 | +In this section we will describe the main ways to install the package. |
| 5 | +For new users, we recommend installing the package from PyPI. |
| 6 | +For users who want to contribute to the package, we recommend using Poetry to install the package from the source code. |
4 | 7 |
|
5 | 8 | ## Prerequisites
|
6 | 9 |
|
7 | 10 | **Python Version:** `AutoEmulate` requires Python `>=3.10` and `<3.13`.
|
8 | 11 |
|
9 |
| -## Install from GitHub |
10 |
| - |
11 |
| -This is the easiest way to install `AutoEmulate`. |
12 |
| - |
13 |
| -Currently, because we are in active development, it's recommended to install the development version from GitHub: |
14 |
| - |
15 |
| -```bash |
16 |
| -pip install git+https://github.com/alan-turing-institute/autoemulate.git |
17 |
| -``` |
18 |
| - |
19 | 12 | ## Install from PyPI
|
20 | 13 |
|
21 | 14 | To get the latest release from PyPI:
|
@@ -59,5 +52,70 @@ poetry env activate
|
59 | 52 | Then activate the virtual environment using the command displayed by the previous command. This will be something like:
|
60 | 53 |
|
61 | 54 | ```bash
|
62 |
| - source /Users/yourName/Library/Caches/pypoetry/virtualenvs/autoemulate-l4vGdsmY-py3.11/bin/activate |
63 |
| -``` |
| 55 | +source /Users/yourName/Library/Caches/pypoetry/virtualenvs/autoemulate-l4vGdsmY-py3.11/bin/activate |
| 56 | +``` |
| 57 | + |
| 58 | +## Interactive tutorials |
| 59 | + |
| 60 | +You can run the Quickstart demo and other interactive tutorials fron the documentation locally. |
| 61 | +The examples are all Jupyter notebooks and can be run in your favoured method, such as JupyterLab, Jupyter Notebook, or VS Code. |
| 62 | + |
| 63 | +<details> |
| 64 | +<summary> |
| 65 | +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. |
| 66 | +</summary> |
| 67 | + |
| 68 | +1. Clone the AutoEmulate repository: |
| 69 | + |
| 70 | + ```bash |
| 71 | + git clone https://github.com/alan-turing-institute/autoemulate |
| 72 | + ``` |
| 73 | +2. Navigate into the directory: |
| 74 | + |
| 75 | + ```bash |
| 76 | + cd autoemulate |
| 77 | + ``` |
| 78 | +3. Set up a virtual environment called `autoemulate`: |
| 79 | + |
| 80 | + ```bash |
| 81 | + python -m venv autoemulate |
| 82 | + ``` |
| 83 | +4. Activate the virtual environment: |
| 84 | + - On Windows: |
| 85 | + |
| 86 | + ```bash |
| 87 | + autoemulate\Scripts\activate |
| 88 | + ``` |
| 89 | + |
| 90 | + - On macOS/Linux: |
| 91 | + |
| 92 | + ```bash |
| 93 | + source autoemulate/bin/activate |
| 94 | + ``` |
| 95 | +5. Install the package from PyPI: |
| 96 | + |
| 97 | + ```bash |
| 98 | + pip install autoemulate |
| 99 | + ``` |
| 100 | +6. Install JupyterLab: |
| 101 | + |
| 102 | + ```bash |
| 103 | + pip install jupyterlab |
| 104 | + ``` |
| 105 | +7. Create a Jupyter kernel for the virtual environment: |
| 106 | + |
| 107 | + ```bash |
| 108 | + python -m ipykernel install --user --name autoemulate --display-name "Python (autoemulate)" |
| 109 | + ``` |
| 110 | + |
| 111 | + This command registers the virtual environment as a Jupyter kernel named `Python (autoemulate)`, which you can select in JupyterLab. |
| 112 | +8. Launch JupyterLab: |
| 113 | + |
| 114 | + ```bash |
| 115 | + jupyter lab |
| 116 | + ``` |
| 117 | +9. Open the `docs/getting-started/quickstart.ipynb` notebook in JupyterLab. |
| 118 | +10. 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 selecting `Python (autoemulate)` from the dropdown menu. |
| 119 | +11. Find other interactive tutorials in the `docs/tutorials` directory, which you can open and run in JupyterLab. |
| 120 | + |
| 121 | +</details> |
0 commit comments