Python packages needed/recommended

You should have Python (3.8+) running on your laptop! Most modern laptops already have Python installed, so always check, if that is the case, before installing further. Possibly, you'll have to update Python to the latest version (currently 3.12.0 (just out 2nd of October 2023!), but anything 3.8 and up is OK).

An additional option is running Python through a Jupyter notebook on the science faculty server ERDA, so in principle a browser is enough. But in order to be able to run your Python code independently of network and access, we strongly recommend, that you have Python installed on your laptop (possibly through an Anaconda environment).

Python is often used with packages, which enables new (and often extremely useful and fast) features possible in your programs.
We will of course make use of packages (the most common ones, and a few specific for statistics), which in this course are:

  • os - Allows using operating system dependent functionality.
  • scipy - A collection of tools for scientific computing, including "stats" for statistics.
  • numpy - Numerical Python, with powerful N-dim arrays and linear algebra commands.
  • pandas - Data reading, analysis, and manipulation tool.
  • matplotlib - The Python standard for plotting graphs and histograms.
  • iminuit2 (i.e. v2!) - The Python interface to the minimisation package Minuit for fitting (currently v2.23.0 is the latest).
           Note that iminuit might require to be installed through "pip".
  • sympy - Analytic calculation library, very useful for differentiation and integration within Python code.
  • seaborn - Plotting library built on top of Matplotlib and contains many nice tools for statistical visualization.

    If the above doesn't work, please write us.
    And we will surely use more packages, as will you also have/find additional ones, which makes your life easier and your coding more powerful.


    If you are using conda, then the following is a guide to install all required packages in a separate conda environment:

    1. Download provided appstat_environment.yml file.
    2. In your terminal run the following command to install the environment: "conda env create -f appstat_environment.yml"
           Note: installation requires ~1G of disk space.
    3. Everything is ready. To activate the 'appstat' environment, type: "conda activate appstat"
           To deactivate: "conda deactivate"
           To remove the environment with its packages when you don't need it: "conda remove --name appstat --all"

    Last updated 9th of October 2023.