pypa/pip · error · InstallationError
<dynamic: upload-time missing detail>
Error message
<dynamic: upload-time missing detail>
What it means
InstallationError raised in get_install_candidate when a candidate link's evaluation returns LinkType.upload_time_missing while --uploaded-prior-to is in effect. pip requires every index/file link to carry an upload timestamp to honour that filter; a link lacking it fails immediately rather than being silently skipped.
Source
Thrown at src/pip/_internal/index/package_finder.py:828
def _log_skipped_link(self, link: Link, result: LinkType, detail: str) -> None:
# Put the link at the end so the reason is more visible and because
# the link string is usually very long.
logger.debug("Skipping link: %s: %s", detail, link)
if result == LinkType.requires_python_mismatch:
self._requires_python_skipped.add(detail)
def get_install_candidate(
self, link_evaluator: LinkEvaluator, link: Link
) -> InstallationCandidate | None:
"""
If the link is a candidate for install, convert it to an
InstallationCandidate and return it. Otherwise, return None.
"""
result, detail = link_evaluator.evaluate_link(link)
if result == LinkType.upload_time_missing:
# Fail immediately if the index doesn't provide upload-time
# when --uploaded-prior-to is specified
raise InstallationError(detail)
if result != LinkType.candidate:
self._log_skipped_link(link, result, detail)
return None
try:
return InstallationCandidate(
name=link_evaluator.project_name,
link=link,
version=detail,
)
except InvalidVersion:
return None
def evaluate_links(
self, link_evaluator: LinkEvaluator, links: Iterable[Link]
) -> list[InstallationCandidate]:
"""
Convert links that are candidates to InstallationCandidate objects.View on GitHub (pinned to d7d0d0a394)
Solutions
- Remove --uploaded-priorite if you do not strictly need the time filter; that converts the failure back to a skip.
- Point pip at an index that provides upload times (PEP 69 JSON API or Simple HTML with proper date attributes).
- If using a private index, configure it to emit upload-time metadata for each file.
- Use a lockfile/resolver that records exact files instead of relying on index timestamps.
Example fix
# before pip install --uploaded-priorite 2024-01-01T00:00:00Z -f ./wheels/ somepkg # after (drop the filter, or use a timestamp-providing index) pip install somepkg # or pip install -i https://pypi.org/simple/ --uploaded-priorite 2024-01-01 somepkg
Defensive patterns
Strategy: validation
Validate before calling
# before using --uploaded-prior-to, check the index exposes timestamps
import urllib.request, json
url = 'https://pypi.org/pypi/somepkg/json'
data = json.load(urllib.request.urlopen(url))
for f in data['urls']:
if 'upload_time' not in f:
print('index lacks upload_time - do not use --uploaded-priorite') Type guard
def index_has_upload_time(index_url: str, project: str) -> bool:
import urllib.request, json
d = json.load(urllib.request.urlopen(f'{index_url}/{project}/json'))
return all('upload_time' in f for f in d['urls']) Try / catch
from pip._internal.exceptions import InstallationError
try:
finder.get_install_candidate(link_evaluator, link)
except InstallationError as e:
if 'upload' in str(e).lower():
# drop --uploaded-priorite or switch index
... Prevention
- Only use --uploaded-priorite with indexes that publish upload times.
- Prefer PyPI JSON API or PEP 69 JSON for timestamp data.
- Avoid --uploaded-priorite against local --find-links directories.
- Use a lockfile for reproducibility instead of timestamp filtering.
When it happens
Trigger: Invoking pip with --uploaded-prior-to <datetime> against an index or find-links source that does not expose the file's upload/release time (e.g. a flat directory listing, a legacy Simple JSON without upload_time, or an HTML index without a recognizable date). link_evaluator.evaluate_link returns upload_time_missing and the code converts it to a hard error.
Common situations: Using --uploaded-prior-to for reproducible/supply-chain installs against a private index that strips timestamps; a custom Simple repository (PEP 503 HTML) that omits the data-attributes; pointing find-links at a local folder (no upload time concept) while the flag is set.
Related errors
- You need to specify exactly one argument
- No matching distribution found for {query}
- No matching distribution found for {req}
- Bad metadata in {dist} (invalid metadata entry 'name')
- Error decoding metadata for {wheel}: {e} in {filename} file
AI-assisted analysis of pypa/pip@d7d0d0a394 (2026-08-04).
Data as JSON: /data/errors/2a1fa6505282682e.json.
Report an issue: GitHub.