This repository hosts the notebooks that support the posts in the Ionworks blog. You can either run them in the cloud using Google Colab or locally.
In order to run the notebooks locally you will need to installing a number of packages. We recommend installing within a virtual environment in order to not alter any python distribution files on your machine.
PyBaMM is available on GNU/Linux, MacOS and Windows. For more detailed instructions on how to install PyBaMM, see the PyBaMM documentation.
To install the requirements on Linux/Mac OS use the following terminal commands:
- Clone the repository
git clone https://github.com/ionworks/blog-notebooks
- Change into the
blog-notebooks
directory
cd blog-notebooks
- Create a virtual environment
virtualenv env
- Activate the virtual environment
source env/bin/activate
- Install PyBaMM and Jupyter
pip install pybamm jupyter
- Launch Jupyter notebook
jupyter notebook
- You can check the notebooks in your browser.
To install the requirements on Windows use the following commands:
- Clone the repository
git clone https://github.com/ionworks/blog-notebooks
- Change into the
blog-notebooks
directory
cd blog-notebooks
- Create a virtual environment
python -m virtualenv env
- Activate the virtual environment
env\Scripts\activate
where env
is the path to the environment created in step 3 (e.g. C:\Users\'Username'\env\Scripts\activate.bat
).
- Install PyBaMM and Jupyter
pip install pybamm jupyter
- Launch Jupyter notebook
jupyter notebook
- You can check the notebooks in your browser.
As an alternative, you can set up Windows Subsystem for Linux. This allows you to run a full Linux distribution within Windows.