Skip to content

Installation#

Setting up a user environment#

As a python_boilerplate user, it is easiest to install using the mamba package manager, as follows:

  1. Install mamba with the Mambaforge executable for your operating system.
  2. Open the command line (or the "miniforge prompt" in Windows).
  3. Create the python_boilerplate mamba environment: mamba create -n python_boilerplate -c conda-forge -c brynpickering bryn_python_boilerplate
  4. Activate the python_boilerplate mamba environment: mamba activate python_boilerplate

All together:

mamba create -n python_boilerplate -c conda-forge -c brynpickering bryn_python_boilerplate
mamba activate python_boilerplate

Running the example notebooks#

If you have followed the non-developer installation instructions above, you will need to install jupyter into your python_boilerplate environment to run the example notebooks:

mamba install -n python_boilerplate jupyter

With Jupyter installed, it's easiest to then add the environment as a jupyter kernel:

mamba activate python_boilerplate
ipython kernel install --user --name=python_boilerplate
jupyter notebook

Choosing a different environment name#

If you would like to use a different name to python_boilerplate for your mamba environment, the installation becomes (where [my-env-name] is your preferred name for the environment):

mamba create -n [my-env-name] -c conda-forge --file requirements/base.txt
mamba activate [my-env-name]
ipython kernel install --user --name=[my-env-name]

Setting up a development environment#

The install instructions are slightly different to create a development environment compared to a user environment:

git clone git@github.com:brynpickering/python_boilerplate.git
cd python_boilerplate
mamba create -n python_boilerplate -c conda-forge --file requirements/base.txt --file requirements/dev.txt
mamba activate python_boilerplate
pip install --no-deps -e .

For more detailed installation instructions specific to developing the python_boilerplate codebase, see our development documentation.