Installing Python, creating a virtual environment, and installing the workshop libraries
Hands-on: GORDIAN score — Thursday 2 July, 13:45–15:15
Coffee break 15:15–15:30 · continued 15:30–16:45
Aleksandra Suwalska & Karolina Kuliś — Department of Data Science and Engineering, Silesian University of Technology, Gliwice
💬 Support & questions: Slack only
All communication about this workshop goes through our Slack channel. If you're in the EEBG 2026 workspace, open it here:
Open the Slack channel →Test your setup in advance. If something fails, post on Slack before the session. We cannot resolve every issue live during the workshop.
⏰ You can install everything during the session — but doing it in advance helps
There's enough time in the workshop to install Python and complete the tasks, so this is optional. That said, if you set things up beforehand you'll arrive ready and spend the full session on the actual analysis instead of installation. These instructions are written so that even if this is your first time using Python, you can follow them step by step.
On this page
📋 What you'll need
| 🐍 | Python 3 installed on your computer — 3.10, 3.11 or 3.12 recommended (see the note under “What gets installed” below) |
| 📁 | The workshop materials downloaded into one folder (must contain requirements.txt) |
| ⌨️ | A terminal: Windows → Command Prompt (Wiersz polecenia, recommended) or PowerShell · macOS / Linux → Terminal |
| 📦 | A virtual environment with the required libraries installed (the steps below create this) |
📁 WORKSHOP MATERIALS
Workshop files (including requirements.txt) are shared in this Google Drive folder. Additional files will appear here as the instructor uploads them, so check the folder again before the session. Put everything into one workshop folder on your computer.
Shared via Google Drive · files will be available here for the session.
📦 What gets installed
Running pip install -r requirements.txt installs the Python libraries this workshop uses:
numpy
pandas
scipy
scikit-learn
statsmodels
matplotlib
seaborn
umap-learn
gseapy
jupyterlab
ipywidgets
umap-learn (which builds on numba/llvmlite) and gseapy — are sometimes slow to ship prebuilt packages for the very newest Python release. On a brand-new version (e.g. 3.13) their install can fail or try to compile from source. A 3.10–3.12 Python avoids this entirely. If you already have a newer Python and the install fails on one of these, that's the likely cause — post on Slack and we'll help.
If you already have conda or Miniforge, you can use a conda environment instead of the venv steps below. One of the packages, gseapy, comes from the bioconda channel, so configure the channels first:
conda config --add channels conda-forge conda config --add channels bioconda conda create -n gordian python=3.11 conda activate gordian conda install numpy pandas matplotlib seaborn bioconda::gseapy \ statsmodels umap-learn scikit-learn scipy jupyterlab ipywidgets
Then start JupyterLab from the activated environment:
jupyter lab
conda config --set channel_priority flexible and repeat the conda install. If you don't use conda already, skip this box and follow the standard steps below.💡 First, two words you'll see a lot
Terminal / Command Prompt — a text window where you type commands instead of clicking. You'll use it to move into the workshop folder, create the environment, and install packages.
Virtual environment — a separate Python workspace just for this workshop. It lets us install the workshop's libraries without touching the Python already on your computer, so nothing conflicts with your other projects.
Pick your operating system and follow that section:
If Python is already installed, you can skip straight to Step 3 (create the virtual environment).
Step 1 · Check whether Python is already installed
Open the Start menu and type Wiersz polecenia (or Command Prompt), or PowerShell, and open it. In the window that appears, type:
py --version
If that shows nothing useful, try:
python --version
✓ See something like Python 3.11.x? → skip to Step 3. Nothing found? → do Step 2.
Step 2 · Install Python
python --versionStep 3 · Move into the workshop folder
Put all workshop materials in one folder — for example a folder called GORDIAN_hands_on on your Desktop (any name is fine). Then move into it with cd (“change directory” — it points the terminal at that folder):
cd Desktop cd GORDIAN_hands_on
Confirm the workshop files are here by listing the folder contents:
dir
requirements.txt in the list, you're in the wrong folder. Note: if your Desktop is synced to OneDrive, the first step may need to be cd OneDrive\Desktop instead of cd Desktop.Step 4 · Create the virtual environment
This makes a .venv folder inside your project that holds a private Python just for this workshop. You only do this once.
py -m venv .venv
Step 5 · Activate the environment
.venv\Scripts\activate
You should now see (.venv) at the start of the line — that means the terminal is now using the workshop's Python.
Step 6 · Upgrade pip and install the libraries
pip installs Python libraries. Upgrade it first (fewer install errors), then install everything listed in requirements.txt:
python -m pip install --upgrade pip python -m pip install -r requirements.txt
✓ This can take a few minutes. If it finishes with no error at the end, you're installed and ready.
Step 7 · Start JupyterLab
See the How to run and use JupyterLab section below (with screenshots), or if you already know it, launch it and start on the tasks.
↩️ Coming back later (optional)
Next time, you don't recreate .venv or reinstall anything — just open a terminal, go to the folder, and activate:
cd Desktop\GORDIAN_hands_on .venv\Scripts\activate
To leave the environment when you're done: deactivate
Step 1 · Open Terminal and check for Python
Open Terminal: press Cmd + Space, type Terminal, press Enter. Then type:
python3 --version
✓ See Python 3.11.x (or similar)? → skip to Step 3. Nothing? → do Step 2.
Step 2 · Install Python
The simplest option: download the latest stable Python 3 for macOS from python.org/downloads/macos and run the installer. Then close Terminal and open it again, and check:
python3 --version
Advanced users can install with Homebrew instead, but that's not required for the workshop.
Step 3 · Move into the workshop folder
Put the materials in one folder (e.g. GORDIAN_hands_on on your Desktop), then move into it with cd:
cd ~/Desktop/GORDIAN_hands_on
List the contents to confirm the files are there:
ls
requirements.txt in the list? You're in the wrong folder. Tip: type cd (with a space) then drag the folder from Finder into the Terminal window to paste its exact path.Step 4 · Create the virtual environment
Creates a .venv folder with a private Python for this workshop. Do this once.
python3 -m venv .venv
Step 5 · Activate the environment
source .venv/bin/activate
You should see (.venv) at the start of the line.
Step 6 · Upgrade pip and install the libraries
With (.venv) active, run:
python -m pip install --upgrade pip python -m pip install -r requirements.txt
✓ A few minutes is normal. No error at the end = success.
Step 7 · Start JupyterLab
See the How to run and use JupyterLab section below (with screenshots), or launch it yourself and begin the tasks.
↩️ Coming back later (optional)
cd ~/Desktop/GORDIAN_hands_on source .venv/bin/activate
Leave the environment when done: deactivate · No need to recreate .venv or reinstall packages.
Step 1 · Open Terminal and check for Python
python3 --version
✓ See Python 3.11.x (or similar)? → skip to Step 3. Nothing? → do Step 2.
Step 2 · Install Python
On Ubuntu, Debian or Linux Mint:
sudo apt update sudo apt install python3 python3-pip python3-venv
You may be asked for your system password — that's normal, and it stays invisible as you type (no dots appear). This installs Python, pip, and the venv tool. Then check again:
python3 --version
On other distributions, use your system's package manager to install Python 3, pip, and venv.
Step 3 · Move into the workshop folder
Put the materials in one folder (e.g. GORDIAN_hands_on on your Desktop), then:
cd ~/Desktop/GORDIAN_hands_on
List the contents:
ls
requirements.txt? You're in the wrong folder.Step 4 · Create the virtual environment
python3 -m venv .venv
Do this once — it creates the .venv workspace for this project.
Step 5 · Activate the environment
source .venv/bin/activate
Look for (.venv) at the start of the line.
Step 6 · Upgrade pip and install the libraries
python -m pip install --upgrade pip python -m pip install -r requirements.txt
✓ A few minutes is normal. No error at the end = success.
Step 7 · Start JupyterLab
See the How to run and use JupyterLab section below (with screenshots), or launch it and begin the tasks.
↩️ Coming back later (optional)
cd ~/Desktop/GORDIAN_hands_on source .venv/bin/activate
Leave with deactivate · No need to recreate .venv or reinstall.
Start JupyterLab
Start JupyterLab inside the command window of your system (Command Prompt / Terminal / PowerShell) with:
jupyter lab
JupyterLab should open automatically in your web browser. If it does not open automatically, the command window will show a link — copy that link and paste it into your browser.
What is JupyterLab?
JupyterLab is a working environment for Python. It opens in a web browser, but it runs on your computer. We will use it to work with notebook files, which usually end with .ipynb
A notebook is divided into cells. A cell can contain code, text, results, tables or plots. This is useful during a workshop because we can run the code step by step and immediately see the results.
Basic work in JupyterLab
Open a notebook
In JupyterLab, use the file browser on the left side and open the workshop notebook (a file ending in .ipynb) that the instructor shares.
A notebook is divided into smaller blocks called cells. A cell is one separate part of the notebook. You can run cells one by one. This is useful because we can build the analysis step by step, check intermediate results and correct mistakes without running the whole file every time.
There are two cell types that we will use most often.
A code cell contains Python code. For example:
print("Hello from Python")
When you run a code cell, Python executes the code and shows the result below the cell. Code cells are used for loading data, calculations, analysis, plots and model training.
A Markdown cell contains text, notes, explanations, headings or instructions. Markdown cells are not Python code. They are used to make the notebook easier to read.
Legend to the image above
Shift + Enter.Run a cell
Click inside a cell and press:
Shift + Enter
This runs the selected cell and moves to the next one (it creates an empty cell if there is none). You can also use the Run button at the top of the notebook (the pink panel in the image above).
Edit and rerun a cell
Click inside a code cell, change the code, and run it again with Shift + Enter — the output below the cell will update. To update a Markdown cell, double-click on it.
Add a new cell
Click the + button in the notebook toolbar (pink box in the image above).
Save your notebook
Use Ctrl + S. Save your work regularly. To rename the notebook, right-click it and select “Rename Notebook…”.
Stop code that runs too long
If a cell runs for too long, click the square Stop button in the notebook toolbar.
Restart Python inside the notebook
The Python process running the notebook is called the kernel. If something behaves strangely, restart it via the Kernel > Restart Kernel menu, then run the notebook again from the beginning.
How to close JupyterLab
Ctrl + C.| Symptom | Fix |
|---|---|
Windows: python not recognised even after installing | The “Add python.exe to PATH” box was missed. Reinstall and tick it, then open a fresh terminal. Meanwhile py often still works. |
| PowerShell: activation blocked (“running scripts is disabled”) | Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, or just use Command Prompt (Wiersz polecenia) instead. |
requirements.txt not found by pip | You're not in the workshop folder. Run dir (Windows) / ls (macOS/Linux) and cd into the right folder first. |
Windows: cd Desktop says the path doesn't exist | Your Desktop is on OneDrive. Try cd OneDrive\Desktop instead. |
No (.venv) appears after activating | Activation didn't run. Recheck the exact command for your OS (Windows uses .venv\Scripts\activate, macOS/Linux use source .venv/bin/activate). |
| Install runs for a while | Normal — some libraries are large. Wait for the prompt to return with no error. |
✅ Ready-to-go checklist
python --version (or python3 --version) shows Python 3requirements.txt.venv created and activated — you see (.venv) in the terminalpip install -r requirements.txt finished with no error🤝 Didn't manage to finish? That's fine.
Setup is optional — there's time to install during the workshop, and we'll help anyone who gets stuck at the start. If you do get it working in advance, great: you'll have the full session for the GORDIAN score tasks.
GORDIAN score hands-on · EEBG 2026 · Python virtual environment + JupyterLab