如何使用Python的pip下载并保留打包的压缩文件? [英] How to use Python's pip to download and keep the zipped files for a package?
问题描述
如果我想使用pip
命令下载软件包(及其依赖项),但是保留所有下载的压缩文件(例如django-socialregistration.tar.gz )-有办法吗?
If I want to use the pip
command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?
我尝试了各种命令行选项,但是它似乎总是解压缩并删除 zipfile-或获取zipfile,但对于原始软件包,仅 ,而不是依赖项.
I've tried various command-line options, but it always seems to unpack and delete the zipfile - or it gets the zipfile, but only for the original package, not the dependencies.
推荐答案
pip install --download
已弃用.从8.0.0版开始,您应该使用 pip download
命令:
pip install --download
is deprecated. Starting from version 8.0.0 you should use pip download
command:
pip download <package-name>
这篇关于如何使用Python的pip下载并保留打包的压缩文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!