Table of Contents


Objective

This document outlines the required setup steps for participants attending Python Master Classes in controlled environments such as Government, Finance, Military, etc.

Rumos support team

Python Installation from python.org

SKIP to chapter "Package Management with pip" if you are downloading Python from Company software center

  • Minimum version: Python 3.11
  • Recommended version: Python 3.14+
  • Download and install from python.org or use an approved internal installer
  • During installation, ensure “Add Python to PATH” is checked
  • Prefer Customize installation to install only necessary components

img/img-20260830-130867.png

img/img-20260830-130858.png

img/img-20260830-130866.png

img/img-20260830-130883.png

  • Verify installation by running on a powershell:
python --version

img/img-20260830-130857.png

If the checkbox Add Python to environment variables is not selected, or if installing from a local software center does not provide this option, manually add Python to your PATH. See the next section.

PATH Configuration Troubleshooting

Skip this section if the python --version command worked successfully.

Verify Python on PATH

Ensure the python command is accessible from all terminals/PowerShell sessions by checking the PATH variable. Open PowerShell and type:

$env:path

img/img-20260830-130807.png

Manually Add Python to PATH

Find where Python is installed.
img/img-20260830-130865.png

img/img-20260830-130895.png

img/img-20260830-130838.png

Edit Environment Variables for Your Account

Open the environment variable editor.
img/img-20260830-130817.png

Ensure the Python and Python Scripts directories are included in your PATH.

img/img-20260830-130862.png

Typical location: C:\Users\<username>\AppData\Local\Programs\Python\Python3x\Scripts

Verify the scripts path by running in PowerShell:

pip --version

img/img-20260830-130833.png

Package Management with pip

Configure pip for corporate/proxy environments

  • If behind a proxy or using an internal Artifactory repository, configure pip.ini:
  • Windows: c:\users\<username>\pip\pip.ini

Example pip.ini for Artifactory:

[global]
index-url = https://artifactory.example.com/api/pypi/pypi/simple
trusted-host = artifactory.example.com

Example pip.ini for proxy:

[global]
proxy = http://proxy.example.com:8080
trusted-host = pypi.org

Test pip installation

  • Run:
pip config list
pip install --dry-run requests

img/img-20260830-140802.png

If blocked, verify your proxy or Artifactory configuration, or consult internal recommendations.

Install Common Packages

# Verify empty environment
pip freeze
 
pip install numpy pandas matplotlib ipykernel pylance
 
# Verify installations
pip freeze
(...)
parso==0.8.7
pillow==12.3.0
platformdirs==4.11.5
prompt_toolkit==3.0.53
psutil==7.2.2
pure_eval==0.2.3
Pygments==2.21.0
pyparsing==3.3.2
python-dateutil==2.9.0.post0
pyzmq==27.2.0
six==1.17.0
stack-data==0.6.3
tornado==6.5.8
traitlets==5.16.1
typing_extensions==4.16.0
tzdata==2026.3
wcwidth==0.8.3
(...)

img/img-20260830-140830.png

After installation, pip may suggest adding a new scripts folder to your PATH. Proceed as suggested.

Visual Studio Code Installation

  • Download and install from code.visualstudio.com or from your local software repository.
  • Ensure the installer is approved by your IT department.
  • Verify installation by launching VS Code

img/img-20260830-140855.png

VS Code Extensions

Install the following extensions from VS Code Marketplace:

ExtensionPurpose
PythonPython language support, IntelliSense, linting, debugging
JupyterJupyter notebook support within VS Code

img/img-20260830-140884.png

Install Extensions via Command Line (if marketplace fails)

If a proxy is blocking installations, you can still install extensions manually. Obtain extensions from the VS Code Marketplace or from a VS Code installation with direct internet access.

img/img-20260830-140837.png

Open PowerShell and install the VSIX file downloaded from a VS Code installation with direct internet access:

code --install-extension ms-python.python
code --install-extension ms-toolsai.jupyter
code --install-extension ms-python.vscode-pylance

Running Python Scripts

In VS Code, go to File >> Open Folder and create/open an empty folder.
img/img-20260830-140865.png

  • Create a simple test script (test.py):
    print("Hello, World!")

img/img-20260830-140826.png

Running Jupyter Notebooks in VS Code

  • Ensure the Jupyter extension is installed (see Section 5).
  • Create a simple test notebook (test.ipynb):
  print("Hello, World!")
  • Open the notebook in VS Code
  • Run the cell and verify output
  • Ensure the kernel is available (select Python 3.x kernel).
  • img/img-20260830-140865-1.png

Environment Verification Checklist

StepCommand / ActionExpected Result
Python installedpython --versionPython 3.11+
Scripts on PATHpip --versionpip version info
pip workingpip install requestsSuccessful install
uv installeduv --versionVersion info
Virtual environmentuv venv.venv folder created
venv packagesuv pip listInstalled packages listed
VS Code installedcode --versionVersion info
Python extensioncode --list-extensionsms-python.python
Jupyter extensioncode --list-extensionsms-toolsai.jupyter
Script executionpython test.pyOutput is printed
Notebook executionOpen test.ipynb in VS CodeCells run successfully

Note: All installations and configurations must comply with your organization’s IT security policies. Consult your IT department before installing any software or configuring network settings.

Using ‘uv’ (optional)

uv is a modern, single-binary replacement for pip + venv (and more). It is 10–100× faster than pip, manages Python versions itself, and needs no admin rights — which makes it a good fit for controlled environments.

Why uv

pip + venvuv
Separate tools (python -m venv, pip)One binary, one command style (uv venv, uv pip)
Slow dependency resolutionParallel downloads, 10–100× faster
Uses whatever Python is on PATHCan install and manage Python versions
Manual activation requiredOptional — uv run uses the project venv automatically

Install uv (Windows and Linux)

Windows — PowerShell:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Linux — any shell:

curl -LsSf https://astral.sh/uv/install.sh | sh

Verify in a new terminal (the installer updates PATH for new sessions):

uv --version

Corporate/proxy environments

The install scripts download from astral.sh and GitHub. If blocked, download the standalone binary for your platform from the uv releases page (or request it via your software center) and place it in a folder on your PATH.

Create a virtual environment

From your project folder (the same one you open in VS Code):

# create the venv in a .venv folder
uv venv
 
# activate it
.venv\Scripts\Activate.ps1   # Windows PowerShell
source .venv/bin/activate    # Linux

Your prompt now shows (.venv). uv venv uses the Python already on PATH; to pin a specific version — even one not installed system-wide — use uv venv --python 3.12 (uv downloads it automatically).

To leave the environment: deactivate.

Locked-down machines

uv downloads Python from GitHub when you use --python with a version that is not installed. If your organisation blocks this, drop the flag and use the approved python.org / software-center Python (see Python Installation from python.org).

Install packages into the venv

Same commands you already know from pip, just faster:

# with the venv activated
uv pip install numpy pandas matplotlib ipykernel
 
# verify
uv pip list

With no venv activated, prefix the command and uv finds .venv in the current folder by itself:

uv pip install --python .venv/bin/python requests   # Linux
uv pip install --python .venv\Scripts\python.exe requests   # Windows

Use the venv in VS Code

  1. Open the project folder (File >> Open Folder).
  2. Ctrl+Shift+P → Python: Select Interpreter.
  3. Pick the interpreter inside .venv — VS Code auto-detects it.

From now on, scripts and notebooks in that folder run against the venv; the Jupyter kernel picker offers it as well.

Project workflow (optional)

For a full dependency-managed project (with pyproject.toml and a lockfile):

uv init myproject     # creates myproject/ with pyproject.toml
cd myproject
uv add requests       # adds the dependency and installs it
uv run python test.py # runs inside the project venv — no activation needed

uv run (and uv sync) always operate on the project’s own environment, so teammates reproduce the exact same package versions from the lockfile.