{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# __Installation__" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We assume that the user has installed Python in their system.\n", "`adelie` can be installed with `pip` or from source.\n", "If the user uses `pip` and MacOS (arm64) on the more recent OS and Python version, \n", "they will install from a pre-built wheel.\n", "All other users will build from source and therefore require more setup explained in\n", "[Prerequisites](#prerequisites)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To install `adelie` with `pip`:\n", "\n", "```bash\n", "pip install adelie\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For users who successfully built `adelie` from a pre-built wheel using `pip`, \n", "they may skip [Prerequisites](#prerequisites).\n", "\n", "For the bleeding edge version, follow the instructions in [Developer Installation](#developer-installation)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## __Prerequisites__" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If the user builds from source either through `pip` or directly,\n", "`OpenMP` must be installed on their system.\n", "For `gcc` users, there is nothing to do since `OpenMP` is shipped with the compiler.\n", "For MacOS users using `clang` (default), we recommend installing it through the [Developer Installation](#developer-installation).\n", "The user may also install it through `brew`:\n", "\n", "```bash\n", "brew install libomp\n", "```\n", "\n", "If installed via `brew`, the user must also run:\n", "\n", "```bash\n", "export OPENMP_PREFIX=\n", "```\n", "\n", "so that our installation script will use this `OpenMP` instead." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## __Developer Installation__" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Install conda. We recommend installing [Mambaforge](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html), which is a conda installation with\n", "`mamba` installed by default and set to use `conda-forge` as the default set of package repositories.\n", "\n", "2. Clone the git repo:\n", "\n", " ```bash\n", " git clone git@github.com:JamesYang007/adelie.git\n", " ```\n", "\n", "3. Set up `adelie` conda environment. The list of packages that will be installed in the environment\n", "is in `environment.yml` and `pyproject.toml`.\n", "\n", " ```bash\n", " mamba update -y conda mamba\n", " mamba env create\n", " conda activate adelie\n", " poetry config virtualenvs.create false --local\n", " poetry install --no-root\n", " ```\n", "\n", "4. Install `adelie` in editable mode:\n", "\n", " ```bash\n", " pip install -e .\n", " ```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## __Verify Installation__" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, we load `adelie` to check that the installation was successful." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import adelie as ad" ] } ], "metadata": { "kernelspec": { "display_name": "adelie", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.6" } }, "nbformat": 4, "nbformat_minor": 2 }