Python Developer Tooling Handbook logo

Python Developer Tooling Handbook

Archives
Subscribe
January 15, 2025

One Line Command to Launch a Notebook with Pytorch

uv is changing how accessible Python is for new users.

If you want to try out pytorch in a Jupyter Notebook, you can install uv and then run this single line command:

uv run --python 3.12 --with "torch~=2.4" --with jupyter --with "numpy<2" jupyter lab

uv will grab all your dependencies (including Python 3.12, if you don’t have it installed), install them in an isolated environment, and launch Jupyter Lab.

Don't miss what's next. Subscribe to Python Developer Tooling Handbook:
← Newer It's happening! A Python Type Checker from Astral Older → "uv: Towards a unified vision for Python tooling"

Add a comment:

Posting this comment will subscribe you to this newsletter with the email address you enter.
Share this email:
Share on Twitter Share on LinkedIn
book
Twitter
LinkedIn
tdhopper.com
Powered by Buttondown, the easiest way to start and grow your newsletter.