You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The unsloth installer (pip install unsloth or uv pip install unsloth) hard-codes its dependency resolution to hit pypi.org directly, ignoring the standard environment variables that package managers use for custom index URLs.
Specifically:
PIP_INDEX_URL - ignored by the unsloth installer
UV_INDEX_URL - ignored by the unsloth installer (when using uv)
This means users who have configured their machines to use a private PyPI mirror, corporate proxy repository, or alternative package source cannot install unsloth without manually patching the installation process.
Expected Behavior
The installer should respect standard environment variables:
When using pip: honor PIP_INDEX_URL and PIP_EXTRA_INDEX_URL
When using uv: honor UV_INDEX_URL and UV_EXTRA_INDEX_URL
This is consistent with how virtually all Python packages behave, allowing users to control package resolution at the machine/environment level.
Actual Behavior
The unsloth installer bypasses these environment variables and directly queries pypi.org for dependency versions, causing installation failures or unexpected behavior in environments where:
PyPI.org is not accessible (firewalls, private networks)
A custom index URL should be used (corporate repositories, mirrors)
Specific package versions are pinned at the repository level
Related Issue
This is related to #6025 but materially different. That issue concerns PyPI inaccessibility from certain regions/networks. This issue is about the installer's failure to respect standard environment variable conventions for index URL configuration - it's a portability and configurability problem, not an accessibility one. Even when pypi.org is reachable, users should be able to override the source via environment variables.
changed the title [-]Installer hard-codes PyPI.org instead of respecting PIP_INDEX_URL / UV_INDEX_URL[/-][+][Bug] Installer hard-codes PyPI.org instead of respecting PIP_INDEX_URL / UV_INDEX_URL[/+]on Oct 14, 2026
Thanks for the write-up! I tried to reproduce this and couldn't. pip install unsloth and uv pip install unsloth never choose an index themselves: pip and uv do, and the published Unsloth packages have no direct URL dependencies that could get around them. With pypi.org blocked and PIP_INDEX_URL (pip) or UV_INDEX_URL / UV_DEFAULT_INDEX (uv) pointing at a mirror, everything resolved from the mirror and nothing went to pypi.org. A full Studio installer run behind the same block with UV_INDEX_URL set also finished from the mirror alone.
A few things that can make it look like the index is being ignored:
The Studio installer (install.sh / install.ps1) installs with uv, and uv reads the UV_* variables and uv.toml but not PIP_INDEX_URL or pip.conf. If only pip points at your feed, set UV_DEFAULT_INDEX (and UV_INDEX for extra indexes) to the same URL.
PyTorch's CUDA wheels come from download.pytorch.org on purpose. UNSLOTH_PYTORCH_MIRROR points that at your own mirror.
Closing since the index variables are honored, but please reopen with the installer log if you still see a request going to pypi.org with UV_INDEX_URL set.
Activity
[-]Installer hard-codes PyPI.org instead of respecting PIP_INDEX_URL / UV_INDEX_URL[/-][+][Bug] Installer hard-codes PyPI.org instead of respecting PIP_INDEX_URL / UV_INDEX_URL[/+]Respect PIP_INDEX_URL/UV_INDEX_URL in update version check (fixes uns…
danielhanchen commentedon Oct 21, 2026
Thanks for the write-up! I tried to reproduce this and couldn't.
pip install unslothanduv pip install unslothnever choose an index themselves: pip and uv do, and the published Unsloth packages have no direct URL dependencies that could get around them. With pypi.org blocked andPIP_INDEX_URL(pip) orUV_INDEX_URL/UV_DEFAULT_INDEX(uv) pointing at a mirror, everything resolved from the mirror and nothing went to pypi.org. A full Studio installer run behind the same block withUV_INDEX_URLset also finished from the mirror alone.A few things that can make it look like the index is being ignored:
install.sh/install.ps1) installs with uv, and uv reads theUV_*variables anduv.tomlbut notPIP_INDEX_URLorpip.conf. If only pip points at your feed, setUV_DEFAULT_INDEX(andUV_INDEXfor extra indexes) to the same URL.UNSLOTH_PYTORCH_MIRRORpoints that at your own mirror.Closing since the index variables are honored, but please reopen with the installer log if you still see a request going to pypi.org with
UV_INDEX_URLset.