tl;dr Setting up a typical PyTorch environment (using Mamba)
mamba create -n $ENV_NAME python=3.11
mamba activate $ENV_NAME
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install tqdm einops jaxtyping
pip install ipykernel ipywidgets
python -m ipykernel install --user --name "$ENV_NAME"
IPython and Jupyter
Installing Jupyter notebook
pipx install notebook --include-deps # notebook 7.3.2
pipx inject notebook jupyterlab-vim jupyter-collaboration jupyterlab-freeze widgetsnbextension
Adding and removing IPython kernels
# list existing kernels
jupyter kernelspec list
# add a kernel
python -m ipykernel install --user --name "$ENV_NAME"
# remove a kernel
jupyter kernelspec uninstall "$ENV_NAME"
autoreload
and how it works