Files
MemRelay/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/坑:离线 wheel 下载的平台标签与 sdist 特例.md

20 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 坑:离线 wheel 下载的平台标签与 sdist 特例
type: experience
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/坑离线-wheel-下载的平台标签与-sdist-特例
stable_id: 2bff13bb-b5cc-40fd-8b2f-774f5c6b9dba
scope: project
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
memory_type: experience
status: active
revision: 1
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
created_at: '2026-09-23T15:10:11.097796+00:00'
updated_at: '2026-09-23T15:10:11.097857+00:00'
tags:
- pitfall
- pypi
- wheel
---
pypi_mirror.py download 用 --only-binary + --platform manylinux_2_17_x86_64:1) 个别包(如 watchdog)wheel 只标 manylinux2014_x86_64 无 2_17 复合别名,整批解析失败且 pip 是 all-or-nothing——遇批量失败先拆批定位,再单独 pip download --platform manylinux2014_x86_64。2) 只发 sdist 的包(如 peewee):pip download --no-binary 会在本机触发 PEP517 构建(Windows 无编译器失败),改从 PyPI JSON API(https://pypi.org/pypi/<name>/json 的 urls 里 packagetype=sdist)直接拓 tar.gz;upload 已支持 .tar.gz,pypiserver 原生支持 sdist,容器内安装时纯 Python 包可现场构建。3) pysftp 类 sdist-only 且有替代(paramiko)的直接不收录。