Skip to content

Scientific Python

The scientific Python world has its own packaging history — conda, pixi, CUDA wheels, and large binary dependencies. The handbook explains where uv fits, when conda or pixi are still the right call, and how to install ML packages reliably.

Get started with data science tooling

GPU and ML workflows

Migrate to modern tools

More Scientific Python pages

Everything else tagged scientific-python, grouped by section. Pages featured above are not repeated here.

How To

How to Deploy a uv Project to Hugging Face Spaces

Deploy a uv project to Hugging Face Spaces for a free, public app. Handles gradio integration and secrets.

How to Fix ModuleNotFoundError: No module named 'numpy' When Building a Package with pip

Fix ModuleNotFoundError by declaring build-time dependencies in pyproject.toml or using pip install --no-build-isolation as a quick workaround.

How to Ignore a Dependency in Dependabot Without Blocking Its Security Updates

Scope a Dependabot ignore rule to version updates so a pinned package stops routine PRs but still gets security fixes.

How to Install CUDA PyTorch Wheels Without a GPU

Declare the target CUDA driver version so uv resolves GPU PyTorch wheels on a build machine that has no GPU installed.

How to Install DeepSpeed

Install DeepSpeed from a prebuilt wheel on the Astral GPU index instead of compiling its CUDA ops from source.

How to Install Flash-Attention

Install Flash-Attention prebuilt wheels with uv to skip CUDA compilation. Route torch and flash-attn to GPU indexes for instant ML environment setup.

How to Install Hugging Face Transformers with uv

Install Hugging Face Transformers with uv for CPU inference, GPU training with CUDA, or quantized model loading with accelerate and bitsandbytes.

How to Install JAX with uv

Install JAX for CPU, NVIDIA GPU (CUDA 12/13), or Google TPU with uv. JAX uses pip extras; no custom index configuration needed.

How to Install llama-cpp-python

Install llama-cpp-python with GPU acceleration for CUDA or Metal, using prebuilt wheels or compiling from source.

How to Install Triton

Install Triton GPU compiler for custom kernel development on Linux. Works standalone or as a PyTorch dependency for GPU optimization.

How to Install xformers

Install Meta's xformers library with the correct PyTorch and CUDA versions using pip, uv, or conda-forge.

How to Migrate from conda to uv

Convert a conda environment to a uv project with pyproject.toml and uv.lock for reproducible installs that finish in seconds.

How to Package Python Projects with Native Extensions

Build and check sdists and platform wheels for Python projects that ship C, C++, or Rust extension modules.

How to Publish a Python Package to conda-forge

Generate a conda recipe with grayskull, submit it to conda-forge staged-recipes, and inherit a bot-maintained feedstock for your PyPI package.

How to Run a Jupyter Notebook with uv

Run Jupyter with uv: launch a temporary session with one command, or add it to a project for reproducible notebooks.

How to run uv on Modal

Build Modal images from a uv.lock with uv_sync, install ad-hoc packages with uv_pip_install, and run the synced environment on a GPU.

How to Serve LLMs Locally with vLLM and uv

Install vLLM with uv for local LLM serving and inference. NVIDIA CUDA GPU acceleration. OpenAI-compatible API endpoints.

How to Use marimo with uv

Run marimo notebooks with uv: sandboxed PEP 723 notebooks, ad-hoc uvx sessions, and project environments.

From the blog

Posts tagged scientific-python.

Last updated on