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 uvYou can install uv using Scoop on Windows:
scoop install uvCreate 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 duckdbThis 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 pytestThis 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