Installation and update

Prerequisite

You need version 3.10 (or a more recent version) of Python 3. You can check your version of Python 3 with:

python3 --version

Using PyPI (stable version)

Install plothist

  1. (Optional) Setup and activate a virtual environment:

    python3 -m venv .venv
    
    source .venv/bin/activate
    
  2. Install plothist from PyPI into your environment.

    1. If you have a local installation, you can use the normal setup command:

    python3 -m pip install plothist
    
    1. If this fails because you do not have write access to where your virtual environment lives, you can also install plothist locally:

    python3 -m pip install --user plothist
    

This will automatically also install plothist into your current environment. Please make sure to always setup your environment correctly before using plothist.

The plothist package can now be imported in any of your scripts. Now you can go on with the step by step tutorial starting with Plot 1D histograms or directly to the example gallery.

Update plothist

To update plothist to its latest stable version, follow the instructions above, adding the argument --upgrade right after pip3 install:

python3 -m pip install --upgrade [--user] plothist

Install the development version

  1. Fork and clone locally the plothist repository, then go to the package folder:

    git clone git@github.com:USERNAME/plothist.git
    
    cd plothist
    

Option 2 - Not using uv

  1. Setup and activate a virtual environment:

    python3 -m venv .venv
    
    source .venv/bin/activate
    
  2. Run the following command to install the package in editable mode with the development and test dependencies:

    python3 -m pip install --editable ".[dev,test]"
    

To update plothist to its latest development version, go to the package folder and run:

git pull