Installing PyChaste
On this page
There are three ways to get PyChaste running on your system:
- Using the Conda Package – supported on Linux.
- Using the Docker Image – supported on any platform.
- Building from Source – supported on Linux.
Conda Package
The conda package installs several dependencies automatically. Please install
mamba
first, as dependency resolution can be
quite slow with conda
itself.
We recommend that you install in a new environment. To do this, run:
where <env-name>
is the name of the new environment. To activate the environment, run:
Alternatively, you can install in an existing conda environment. With the environment activated, run:
Note
Trying to install in an existing environment may fail if it already has conflicting dependencies installed!
Optionally, you can install and launch a Jupyter notebook from the environment:
Docker Image
The docker image comes with PyChaste and Jupyter pre-installed. If you do not already have docker installed, please follow the instructions to get docker.
With docker installed, you can pull the image and launch a PyChaste container with the following command:
You can open a Jupyter notebook from the container by launching a web
browser and going to the address http://localhost:8888
.
Build from Source
To build PyChaste from source, we first need to install Chaste. See the Chaste Install Guides for information on installing Chaste dependencies.
After installing the required dependencies, clone the Chaste repository:
Clone the PyChaste repository into the Chaste projects directory:
Note
--recursive
is important for retrieving git submodules. The build will fail
without it!
From outside the source tree, create a build folder and generate the CMake configuration:
To build PyChaste, run:
Finally, pip install
the built package with these commands:
See Also