Skip to content

ml-uhh/python-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-template

A dev environment template for students of courses by the ML working group.

Tutorial

This tutorial will guide you through setting up a local development environment for your machine learning courses.

If you prefer to not work on your local machine, you can also use services like Google Colab.

We will use VSCode as the IDE and uv as the package manager. Feel free to use any other package manager, but we recommend using uv for its simplicity and environment management features. To follow this tutorial, you should have git, VSCode, and uv installed on your machine.

1. Clone the repository and open it in VSCode

  • Navigate to a folder where you want to store the code.

  • Clone the repository using the command:

      git clone https://github.com/ml-uhh/python-template.git
  • Open the folder in VSCode.

      code python-template

2. Setup VSCode for use with Jupyter notebooks and Python

3. Setup the Python environment

We have already initialized the project. Use uv to install the dependencies and create an environment.

  uv sync

There should now be a new folder containing the environment at ./.venv/

4. Open a notebook

  • Open the numpy tutorial notebook.
  • In the top right corner, select the Python environment created by uv (should be called python-template).
  • You should now be able to run the notebook cells.

5. Add more packages

You may notice that some cells report missing packages. For example, numpy and matplotlib are missing. You can add them using uv:

  uv add numpy matplotlib

About

A dev environment template for students of courses by the ML working group.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors