Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install python releases from offline registry #6319

Closed
DataOps7 opened this issue Aug 21, 2024 · 7 comments · Fixed by #6950
Closed

Install python releases from offline registry #6319

DataOps7 opened this issue Aug 21, 2024 · 7 comments · Fixed by #6950
Labels
enhancement New feature or request help wanted Contribution especially encouraged uv python Related to the uv python interface

Comments

@DataOps7
Copy link

DataOps7 commented Aug 21, 2024

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!

@charliermarsh
Copy link
Member

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?

@charliermarsh charliermarsh added the needs-design Needs discussion, investigation, or design label Aug 21, 2024
@mboeck-altair
Copy link

Accepting a folder like conda custom disk-based channels would be the easiest way how to use this on an air-gapped system.

@zanieb
Copy link
Member

zanieb commented Aug 23, 2024

I think file:// for MIRROR is probably the move here?

@zanieb zanieb added enhancement New feature or request uv python Related to the uv python interface labels Aug 23, 2024
@charliermarsh
Copy link
Member

Yeah. We probably need to modify the “download” code a bit to handle that.

@zanieb zanieb added help wanted Contribution especially encouraged and removed needs-design Needs discussion, investigation, or design labels Aug 23, 2024
@zanieb
Copy link
Member

zanieb commented Aug 23, 2024

Making "fetch" sound like a better name again 😭 haha

@kohlrabi
Copy link

kohlrabi commented Aug 27, 2024

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?

@zanieb
Copy link
Member

zanieb commented Aug 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Contribution especially encouraged uv python Related to the uv python interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants