# One Line Command to Launch a Notebook with Pytorch

[uv](https://pydevtools.com/handbook/reference/uv.md) is changing how accessible Python is for new users.

If you want to try out PyTorch in a Jupyter Notebook, you can install [uv](https://pydevtools.com/handbook/reference/uv.md) and then run this single line command:

```bash
uv run --no-project --python 3.12 --with torch --with jupyter jupyter lab
```

uv downloads Python 3.12 if needed, installs PyTorch and Jupyter in a cached environment, and launches JupyterLab. `--no-project` keeps the command independent of a project in the current directory.

This command uses the platform's default PyTorch wheel and does not detect or verify a GPU. For a specific CUDA, ROCm, or CPU-only build, follow [How to Install PyTorch with uv](https://pydevtools.com/handbook/how-to/how-to-install-pytorch-with-uv.md) and launch Jupyter from that configured environment.

## Learn More

- [How to install PyTorch with uv](https://pydevtools.com/handbook/how-to/how-to-install-pytorch-with-uv.md) for production setups with GPU support detection and version management
- [Set up a GPU data science project with pixi](https://pydevtools.com/handbook/tutorial/set-up-a-gpu-data-science-project-with-pixi.md) for a conda-forge approach to managing CUDA and scientific libraries
- [uv: A Complete Guide](https://pydevtools.com/handbook/explanation/uv-complete-guide.md) for the full range of uv workflows and features
