Introduction

Welcome!

  • There is a rather new documentation for python at UPPMAX at: https://uppmax.uu.se/support/user-guides/python-user-guide/

  • We hope that it will be helpful for your future reference.

  • We will approximately follow the outline of it today.

  • We hope also to identify improvements of the page for today´s interactions with you!

Learning outcomes

  • load and run python

  • find installed packages

  • install package with pip

  • install package with conda

  • Understand and create virtual environments

  • best practice

Collabration document HackMD

  • Use the HackMD page for the workshop with your questions.

  • Depending on how many helpers we’ll see how fast there are answers.
    • Some answers may come after workshop.

  • https://hackmd.io/EW_atH_vR5iq-uBFV-CiTw?both

  • Type in left frame
    • “-” means new bullet and <tab> indents the level.

    • don’t focus too much on the formattiong if you are new to “Markdown” language!

  • Have a try with the Icebreaker question

Your expectations?

  • find best practices for using Python at UPPMAX

  • using Conda

  • using Bianca

Not covered

  • improve python coding skills

  • Tetralith

  • Kebnekaise

Prepare your environment now!

  • Please log in to Rackham or other cluster. e.g. ssh <user>@rackham.uppmax.uu.se

  • Create a working directory (e.g. “pythonUPPMAX”) where you can code along.

What is python?

As you probably already know…

  • “Python combines remarkable power with very clear syntax.

  • It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing.

  • There are interfaces to many system calls and libraries, as well as to various windowing systems. …“

More python?

Python at UPPMAX

The python application at UPPMAX comes with several preinstalled packages. A very small selection of these are: Numpy, Pandas, Scipy, Matplotlib, Jupyter notebook, pip, cython, ipython

Questions

  • What to do if you need other packages?

  • How does it work on Bianca without internet?

  • What if I have projects with different requirements in terms of python and packages versions?

Objectives

We will:

  • guide through the python ecosystem on UPPMAX

  • look at the package handlers pip and conda

  • explain how to create isolated environment

Warning

At UPPMAX we call the applications available via the module system modules. https://www.uppmax.uu.se/resources/software/module-system/

To distinguish these modules from the python modules that work as libraries we refer to the later ones as packages.

Outline

  • Loading and running Python

  • Packages/modules

  • How to install packages

  • Isolated environments

  • Not this time: jupyter notebook & parallel jobs
    • Check the next SNIC training letter about new collaboration workshop in beginning of September.