|
| 1 | +Installing a recipe |
| 2 | +=================== |
| 3 | + |
| 4 | +The main repository contains the source files of all recipes, but you |
| 5 | +should only fetch the entire repository if you plan on contributing |
| 6 | +one (see also <CONTRIBUTING.rst>`_). If you are interested in learning |
| 7 | +the techniques discussed in a specific recipe, this is not recommended, |
| 8 | +as you will also have to understand the build mechanism for the |
| 9 | +website. |
| 10 | + |
| 11 | +.. marker-install-start |
| 12 | +
|
| 13 | +Each recipe can be viewed online as an interactive HTML page, but |
| 14 | +can also be downloaded as a stand-alone ``.py`` script, or a |
| 15 | +``.ipynb`` Jupyter notebook. |
| 16 | +To simplify setting up an environment that contains all the dependencies |
| 17 | +needed for each recipe, you can also download an ``environment.yml`` file |
| 18 | +that you can use with conda to create a custom environment to run the example. |
| 19 | +If you have never used conda before, you may want to read this |
| 20 | +`beginners guide |
| 21 | +<https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html>`_. |
| 22 | + |
| 23 | +.. code-block:: bash |
| 24 | +
|
| 25 | + # Pick a name for the environment and replace <environment-name> with it |
| 26 | + conda env create --name <environment-name> --file environment.yml |
| 27 | +
|
| 28 | + # when you want to use the environment |
| 29 | + conda env activate --name <environment-name> |
| 30 | +
|
| 31 | +You can then execute the script from the command line, or open the |
| 32 | +notebook in Jupyter lab. Additional data needed for each example is usually |
| 33 | +either downloaded dynamically, or can be found in a ``data`` folder for each |
| 34 | +example, or downloaded as a ``data.zip`` file at the end of each recipe in |
| 35 | +the website. In the latter case, don't forget to unzip the file in the |
| 36 | +same folder as the ``.py`` or ``.ipynb`` files for the example. |
| 37 | + |
| 38 | +.. marker-install-end |
| 39 | +
|
| 40 | +
|
| 41 | +
|
| 42 | +
|
0 commit comments