Skip to content

PyPI Configuration

pypi:
  enabled: true
  repository:
    - name: pypi
      registry: https://pypi.org
      packages-registry: https://files.pythonhosted.org
      scan-manifest: true
      scan-package: true
      work-mode: strict_wait
      url-encoded-config: true
    - name: pytorch-pypi
      registry: https://download.pytorch.org
      packages-registry: https://download.pytorch.org
      additional-packages-registries:
        download.pytorch.org: https://download.pytorch.org
        download-r2.pytorch.org: https://download-r2.pytorch.org
        files.pythonhosted.org: https://files.pythonhosted.org
      scan-manifest: true
      scan-package: true
      work-mode: strict_wait
      url-encoded-config: true

Example pip.conf:

[global]
index-url = https://osa-proxy.example.com/pypi/simple/

Persistent configuration with pip config:

python -m pip config set global.index-url https://osa-proxy.example.com/pypi/simple/

One-off install:

pip install --index-url https://osa-proxy.example.com/pypi/simple/ requests

For PyTorch, use a dedicated repository:

pip install --index-url https://osa-proxy.example.com/pytorch-pypi/whl/cu121 torch
Страница была полезна?