Installation#
Setting up a user environment#
As a PAM user, it is easiest to install PAM using the mamba package manager, as follows:
- Install mamba with the Mambaforge executable for your operating system.
- Open the command line (or the "miniforge prompt" in Windows).
- Download (a.k.a., clone) the PAM repository:
git clone git@github.com:arup-group/pam.git
- Change into the
pam
directory:cd pam
- Create the PAM mamba environment:
mamba create -n pam -c conda-forge -c city-modelling-lab --file requirements/base.txt
- Activate the PAM mamba environment:
mamba activate pam
- Install the PAM package into the environment, ignoring dependencies (we have dealt with those when creating the mamba environment):
pip install --no-deps .
All together:
git clone git@github.com:arup-group/pam.git
cd pam
mamba create -n pam -c conda-forge -c city-modelling-lab --file requirements/base.txt
mamba activate pam
pip install --no-deps .
We do not recommend trying to install PAM directly with pip (e.g. in a virtual environment) as you need to first install underlying native geospatial libraries, the method for which differs by operating system.
If you choose to install into a virtual environment, ensure you have libgdal
and libspatialindex
installed on your device before installing with pip.
Running the example notebooks#
If you have followed the non-developer installation instructions above, you will need to install jupyter
into your pam
environment to run the example notebooks:
With Jupyter installed, it's easiest to then add the environment as a jupyter kernel:
Choosing a different environment name#
If you would like to use a different name to pam
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 -c city-modelling-lab --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:arup-group/pam.git
cd pam
mamba create -n pam -c conda-forge -c city-modelling-lab --file requirements/base.txt --file requirements/dev.txt
mamba activate pam
pip install --no-deps -e .
For more detailed installation instructions specific to developing the PAM codebase, see our development documentation.