Install python releases from offline registry
When running uv python install allow to specify a registry other than python-build-standalone on GitHub.
I want to allow users to use uv to manage Python versions but we're working in an offline air-gapped network.
Thanks!
We do support a proxy URL for this (UV_PYTHON_INSTALL_MIRROR) -- does that help? Could you serve them on localhost? What if it could accept a file: URL?
Accepting a folder like conda custom disk-based channels would be the easiest way how to use this on an air-gapped system.
I think file:// for MIRROR is probably the move here?
Yeah. We probably need to modify the “download” code a bit to handle that.
Making "fetch" sound like a better name again 😭 haha
I'm currently using self-compiled Python binaries on a air-gapped Debian system to create venvs with different versions for my various projects, along with accompanying "global" venvs I use to create project venvs with, so my workflow is like this:
$ git init new_project
$ activate_py12 # activates "global" ~/python/venv-3.12
$ cd new_project
$ python -m venv .venv # project now has a local 3.12 venv
I expected that when I install uv in my "global" 3.12 venv I would be able this installation as Python version in uv when passing system or only-system as my python-preference, but that does not work, it still only finds the Debian system Python v3.11. How can I convince uv to use the version and interpreter in the currently running (v)env?
For some commands, like those that create a virtual environment, we don't look for interpreters in virtual environments. Instead, you should add the interpreter to your PATH. See https://docs.astral.sh/uv/concepts/python-versions/#discovery-of-python-versions