ARTIFACTORY: How to Resolve Dependency Resolution Errors When Installing PyTorch Packages via a PyPI Remote Repository

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Akshatha P
articleNumber
000007175
FirstPublishedDate
2026-09-24T07:57:26Z
lastModifiedDate
2026-09-24

ARTIFACTORY: How to Resolve Dependency Resolution Errors When Installing PyTorch Packages via a PyPI Remote Repository

Issue Summary
When attempting to install PyTorch packages using a PyPI remote repository configured to point to the PyTorch index (https://download.pytorch.org/whl/), the installation fails when resolving foundational dependency packages such as filelock or typing-extensions


Symptoms
When running pip install against the PyPI remote repository, the installation halts with output similar to the following:
#pip install torch==2.13.0 --no-cache-dir --index-url
https://<username>:<token>@jpd.local/artifactory/api/pypi/test-pytorch-remote/simple
Looking in indexes:
https://<username>:****@jpd.local/artifactory/api/pypi/test-pytorch-remote/simple
Collecting torch==2.13.0
  Downloading torch-2.13.0-cp314-cp314-macosx_14_0_arm64.whl (111.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 111.2/111.2 MB 13.8 MB/s  0:00:08
INFO: pip is looking at multiple versions of torch to determine which version is compatible with
other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement filelock (from torch) (from versions:
none)
ERROR: No matching distribution found for filelock
Alternatively, client logs may show HTTP 404 or connection failures when attempting to download dependency wheels through this remote repository.


Root Cause
The PyPI remote repository to resolve PyTorch is configured as follows:
  • Repository Key: ‘test-pytorch-remote’ (or your naming standard)
  • URL: ‘https://download-r2.pytorch.org/’
Under PyPI Settings:
  • Registry URL: ‘https://download.pytorch.org’
  • Registry Index Location URL Suffix: ‘whl’
The PyTorch wheel index at https://download.pytorch.org/whl/ hosts PyTorch-specific wheels directly, but its package metadata delegates external dependencies to Python's official repository host https://files.pythonhosted.org/. Below is the reference to the filelock metadata file.
When pip attempts to install a dependency like filelock, the index returns download links pointing to files.pythonhosted.org. Because the configured remote repository is scoped only to https://download-r2.pytorch.org/whl/, requests targeted at files.pythonhosted.org cannot be resolved by the remote repository and are dropped or rejected.


Solution
To resolve this issue, configure a second remote repository that proxies files.pythonhosted.org and combine both remotes into a single Virtual Repository.


Step 1: Verify the PyTorch Remote Repository
Ensure your PyTorch remote repository is configured as follows:
  • Repository Key: ‘test-pytorch-remote’ (or your naming standard)
  • URL: ‘https://download-r2.pytorch.org/’
Under PyPI Settings:
  • Registry URL: ‘https://download.pytorch.org’
  • Registry Index Location URL Suffix: ‘whl’
Step 2: Create a PyPI / Python Hosted Remote Repository
Create a second remote repository to proxy upstream PyPI binary hosts:
  • Repository Key:  ‘test-remote’ (or your naming standard)
  • URL: ‘https://files.pythonhosted.org’
Under PyPI Settings:
  • Registry URL: ‘https://pypi.org’
  • Registry Index Location URL Suffix: ‘Simple’
Step 3: Aggregate into a Virtual Repository
Create a unified endpoint so client tools can query both sources through a single URL:
  1. Create a new PyPI Virtual Repository (e.g., pypi-virtual).
  2. Include both remote repositories in the aggregation list:
    • test-remote
    • test-pytorch-remote
Update your pip configuration or run pip install pointing to the newly created Virtual Repository endpoint:

Textproto

pip install torch==2.13.0 --no-cache-dir --index-url
https://<username>:<token>@jpd.local/artifactory/api/pypi/pypi-virtual/simple
Looking in indexes: https://<username>:****@jpd.local/artifactory/api/pypi/pypi-virtual/simple
Collecting torch==2.13.0
  Downloading torch-2.13.0-cp314-cp314-macosx_14_0_arm64.whl (111.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 111.2/111.2 MB 11.9 MB/s  0:00:09
Collecting filelock (from torch==2.13.0)
  Downloading filelock-3.32.2-py3-none-any.whl (98 kB)
Requirement already satisfied: typing-extensions>=4.10.0 in
./path/to/venv/lib/python3.14/site-packages (from torch==2.13.0) (4.15.0)
Requirement already satisfied: setuptools>=77.0.3 in ./path/to/venv/lib/python3.14/site-packages
(from torch==2.13.0) (78.1.0)
Requirement already satisfied: sympy>=1.13.3 in ./path/to/venv/lib/python3.14/site-packages (from
torch==2.13.0) (1.14.0)
Requirement already satisfied: networkx>=2.5.1 in ./path/to/venv/lib/python3.14/site-packages (from
torch==2.13.0) (3.6.1)
Requirement already satisfied: jinja2 in ./path/to/venv/lib/python3.14/site-packages (from
torch==2.13.0) (3.1.6)
Requirement already satisfied: fsspec>=0.8.5 in ./path/to/venv/lib/python3.14/site-packages (from
torch==2.13.0) (2026.4.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in ./path/to/venv/lib/python3.14/site-packages
(from sympy>=1.13.3->torch==2.13.0) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in ./path/to/venv/lib/python3.14/site-packages (from
jinja2->torch==2.13.0) (3.0.3)
Installing collected packages: filelock, torch
Successfully installed filelock-3.32.2 torch-2.13.0