HomeCloud ComputingAmp your Python superpowers with ‘uv run’

Amp your Python superpowers with ‘uv run’




uv run --with numpy==2.0 myfile.py

What occurs underneath the hood?

If you run uv run utilizing --with, uv contacts PyPI and tries to obtain the requirement you’ve named and the suitable model in the event you’ve equipped one. If the requirement is supplied as a wheel, it’ll use that; if not, it’ll get hold of the supply and attempt to compile it to your present platform.

Subsequent, uv caches the ensuing obtain within the listing present in your consumer profile. After that, this system you chose will run with the downloaded necessities.

The primary time uv fetches a requirement from PyPI, you’ll see suggestions in regards to the obtain course of within the console. Relying on what number of necessities there are and the way massive they’re, this will take a while. However on subsequent runs, in the event you ask for a similar necessities, they’ll be obtained out of the native cache, and so will begin nearly immediately.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments