curl - 从 PyPi 下载轮子

标签 curl wget pypi python-wheel

如何从 PyPi 上列出的包中下载特定的轮子?我假设我会使用 wgetcurl ,但我不确定要使用哪些参数。

最佳答案

众所周知,PyPI 很难自省(introspection)。幸运的是,Debian 项目用于扫描 FTP 目录以查找新版本,并设置了解决此问题的解决方案。它记录在 https://wiki.debian.org/debian/watch#PyPI

例如,如果您访问 https://pypi.debian.net/pip/ ,您将拥有长长的发布列表。如您所愿,您可以使用 curl 直接下载 tarball,而无需知道其校验和:

$ curl -LO https://pypi.debian.net/pip/pip-18.1.tar.gz

请注意,即使未列出,您也可以下载轮子。但是您可能需要构建 URL。
$ curl -LO https://pypi.debian.net/pip/pip-18.1-py2.py3-none-any.whl

如果您发现有关此解决方案的一些技巧,请随时分享!

关于curl - 从 PyPi 下载轮子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38386501/

相关文章:

http - curl 不返回任何东西

c - 链接curl库问题

python-3.x - 在自定义包中安装 pip 时,如何修复 install_requires 列表的 'Could not find a version that satisfies the requirement'?

python - 将需求从 requirements.txt 添加到 conda meta.yaml

python - 如何以编程方式访问 Python 包的依赖项?

php - 如何在官方Elasticsearch PHP客户端中设置代理?

php - 使用 CURL 从文件头检索最后修改的文件

mobile - 从命令行使用 Azure 移动服务进行测试

python - 在python中解析wget日志文件

php - n次后如何中止wget