How can I download a specific wheel from a package listed on PyPi? I'm assuming I would use wget or curl, but I'm not sure of which arguments to use.
Asked
Active
Viewed 2,669 times
9
BoltzmannBrain
- 4,644
- 9
- 41
- 70
2 Answers
6
PyPI is known to be hard to introspect. Fortunately, the Debian project is used to scan FTP directories for new versions, and set up a solution to workaround this. It is documented at https://wiki.debian.org/debian/watch#PyPI
For exemple, if you access https://pypi.debian.net/pip/, you will have in long list of release. And as you wish, you can directly download a tarball without knowing its checksum, using curl:
$ curl -LO https://pypi.debian.net/pip/pip-18.1.tar.gz
Note that, even if it's not listed, you can download the wheel. But you may need to construct the URL.
$ curl -LO https://pypi.debian.net/pip/pip-18.1-py2.py3-none-any.whl
If you find some tricks around this solution, feel free to share it !
Étienne Bersac
- 423
- 4
- 10
-
1check out this answer https://stackoverflow.com/a/48327216/2641187 – Darkdragon84 Aug 15 '21 at 09:14
4
Update 2021: PyPI package pages have a section #files where you can conveniently download the .whl you'd like
https://pypi.org/project/<package-name>/#files
Darkdragon84
- 367
- 1
- 11