Skip to content

[Bug] Installer hard-codes PyPI.org instead of respecting PIP_INDEX_URL / UV_INDEX_URL #13737

Closed as not planned

Description

@bc3tech

Problem

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.

Activity

  1. 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
  2. added a commit that references this issue on Oct 14, 2026
    bf1595c
  3. danielhanchen commented on Oct 21, 2026

    @danielhanchen
    Member

    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:

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions