Installation & Setup
Requirements
EasyPeasy is a multi-platform Python library compatible with Python 3.9 through 3.13. Ensure Python is installed on your system before proceeding with the installation.
Environment setup optional
We recommend using a virtual environment to isolate dependencies and avoid conflicts with system-wide packages. If issues arise, you can simply delete and recreate the environment.
Creating and Activating a Virtual Environment:
- Create a new virtual environment:
python3 -m venv venv
-
Activate the environment:
. venv/bin/activate. venv/bin/activate. venv/Scripts/activate # Windows with Unix like shells .\venv\Scripts\activate.bat # Windows with CMD .\venv\Scripts\activate.ps1 # Windows with Power shell
- The terminal should now show
(venv), indicating that the virtual environment is active.
Deactivating and Removing the Virtual Environment:
- Exit the environment with:
deactivate
-
If this environment is no longer needed, delete it:
rm -rf venvrm -rf venvrmdir /s /q venv
Installation guide
Installing from PyPI recommended
EasyPeasy is available on PyPI (Python Package Index) and
can be installed using pip. It is advised to install it within a virtual
environment, as outlined in the previous section
Environment setup.
We recommend installing the latest release of EasyPeasy with the
charts extras, which include optional dependencies used for simplified
visualization of charts and tables. This can be especially useful for running
the Jupyter Notebook examples. To do so, use the following command:
pip install 'easypeasy[charts]'
If only the core functionality is needed, the library can be installed simply with:
pip install easypeasy
To install a specific version of EasyPeasy, e.g. 1.0.3:
pip install 'easypeasy==1.0.3'
Upgrading to the latest version can be done with:
pip install --upgrade --force-reinstall easypeasy
To check the installed version:
pip show easypeasy
Installing from GitHub
Installing an unreleased version is generally not recommended but can be useful for testing purposes.
To install EasyPeasy from, e.g., the develop branch of GitHub:
pip install git+https://github.com/easyscience/peasy-lib@develop
To include extra dependencies (e.g., charts):
pip install 'easypeasy[charts] @ git+https://github.com/easyscience/peasy-lib@develop'
Running tutorials
EasyPeasy provides a collection of Jupyter Notebook examples that demonstrate various functionalities. These tutorials are available in the Hands-on tutorials section of the documentation.
You can also run these tutorials:
- Locally on your machine
- Online via Google Colab (no local installation required)
These Jupyter Notebook examples can be downloaded either one by one from the Hands-on tutorials section or all together as a zip archive from the EasyPeasy releases.
Run tutorials locally
To run tutorials locally, install Jupyter Notebook or JupyterLab. Here are the steps to take in the case of Jupyter Notebook:
- Install Jupyter Notebook:
pip install notebook - Download the latest EasyPeasy tutorial examples from GitHub, e.g.,
using curl:
curl --location --remote-name https://github.com/easyscience/peasy-lib/releases/latest/download/examples.zip - Unzip the archive:
unzip examples.zip - Run Jupyter Notebook server in the
examples/directory:jupyter notebook examples/ - Open your web browser and go to:
http://localhost:8888/ - Select one of the
*.ipynbfiles.
Running tutorials via Google Colab
Google Colab allows you to run Jupyter Notebooks in the cloud without any local installation.
To use Google Colab:
- Ensure you have a Google account.
- Navigate to the Hands-on tutorials section of the documentation.
- Click the Open in Google Colab button available for each tutorial.
This method allows you to experiment with EasyPeasy tutorials instantly, without setting up a Python environment on your system.