←back to thread

Using uv with PyTorch

(docs.astral.sh)
167 points charliermarsh | 6 comments | | HN request time: 0.631s | source | bottom
1. mrbonner ◴[] No.42190760[source]
Does uv support global Python install now? I need something like Mise for this.
replies(3): >>42191001 #>>42192371 #>>42194345 #
2. shlomo_z ◴[] No.42191001[source]
uv python install 3.xx
replies(1): >>42191096 #
3. imjonse ◴[] No.42191096[source]
That is not global. From the uv getting started docs:

"When Python is installed by uv, it will not be available globally (i.e. via the python command). Support for this feature is planned for a future release. In the meantime, use uv run or create and activate a virtual environment to use python directly."

So yes, one needs mise/asdf/pyenv or similar for global installs for now.

replies(1): >>42193327 #
4. cbenz ◴[] No.42192371[source]
Yes via the "--system" option of the different commands.

Or via the global "python-preference" option set to "only-system".

Cf https://docs.astral.sh/uv/concepts/python-versions/#adjustin... and https://docs.astral.sh/uv/reference/settings/#python-prefere...

5. JimDabell ◴[] No.42193327{3}[source]
You could always just `alias python="uv run python"`
6. zanie ◴[] No.42194345[source]
We're working on this! You can try it out with `uv python install --preview`.

The work can be tracked in https://github.com/astral-sh/uv/issues/6265