Skip to content
Python

Python

Python IDEs

Run Python Notebooks online

  • Google Colab: an online jupyter notebook platform for machine learning.
  • Binder: make online (e.g., GitHub repo) notebooks executable.

Package Manager for Python

  • uv: uv is a drop-in replacement for pip, an extremely fast Python package and project manager written in Rust.
  • pixi: pixi supports both conda environment.yml and pip requirements.txt files.
  • Anaconda Python: a full set of scientific Python packages with the conda package manager.   - miniforge : minimal installation with conda and mamba package managers and the conda-forge community packages.
    • micromamba: micromamba is a standalone version of the mamba package manager.
  • pipenv: the official dependency management tool for Python packages.
  • Poetry: Python packaging and dependency management.
  • pdm: A modern Python package manager with PEP 582 support.

Python tutorials

General

Visualizations

Scientific

Data Processing and Machine learning

Scientific machine learning

  • deepxde : deep learning and differential equations.
  • jax : Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more.
  • diffrax : Numerical differential equation solvers in JAX.

Setup Python

Setup Python package managers.

miniforge

https://github.com/conda-forge/miniforge is a Python distribution that uses

  • community-driven conda-forge repository
  • basic conda package manager and the fast new mamba package manager.

Installation

Windows

Download and run the installer in https://github.com/conda-forge/miniforge

Linux

CONDA_PATH="${HOME}/conda"
CONDA_SH="${CONDA_PATH}/etc/profile.d/conda.sh"
CONDA_URL="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh"

# Download and install
wget -O /tmp/conda.sh "${CONDA_URL}"
bash /tmp/conda.sh -bup "${CONDA_PATH}"
source "${CONDA_SH}"
conda activate base

# conda package manager setup
conda config --set auto_activate_base false
conda config --set default_threads $(nproc)
conda update python --yes && conda update --all --yes

# `bash` and `zsh` integration
conda init bash || true
conda init zsh || true

micromamba

micromamba is a fully statically-linked, self-contained, executable for conda environments.

Installation

Windows:

Invoke-Expression ((Invoke-WebRequest -Uri https://micro.mamba.pm/install.ps1 -UseBasicParsing).Content)

Linux:

"${SHELL}" <(curl -L micro.mamba.pm/install.sh)

Update

micromamba self-update

Commands

micromamba has no “base” environment. Other than that, it shares basically the same commands as conda and mamba.

To create an environment:

micromamba create -n <name> <list of packages>

To create an environment from a spec file

micromamba create -n <name> -f <envfile>

To install an environment to a specific folder

micromamba create -p <dirpath> <list of packages>

To activate an environment:

micromamba activate <name>

To run a command from an environment

micromamba run -n <name> <command>

Or

micromamba run -p <dirpath> <command>
Last updated on