LCM Logo
Programming

Python

Installation

Our recommendation is to use uv to install and manage Python versions, packages, and virtual environments.

Install uv

You can install uv using Homebrew on macOS or Linux:

brew install uv

You can install uv using Scoop on Windows:

scoop install uv

Create a new project using uv

uv is really fast and and comprehensive tool that can install and manage:

  • Python itself
  • packages / dependencies
  • virtual environments / projects
uv init .

Add dependencies

For example, to add polars and duckdb as dependencies, you can use the following command:

uv add polars duckdb

This will create the pyproject.toml file and add the dependencies to it, as well as create a virtual environment for the project. You can also add other dependencies as needed.

Add development dependencies

Development dependencies are packages that are only needed during development, such as testing frameworks or linters. To add development dependencies, you can use the --dev flag. For example, to add pytest as a development dependency, you can use the following command:

uv add --dev pytest

This will add the specified packages to the dev dependency group of the pyproject.toml file.

If using VS Code with the Jupyter interactive window, you need to install the ipykernel package as a development dependency:

uv add --dev ipykernel

On this page