When you run pip install somepackage
, pip downloads the latest version of somepackage
.
All archives on PYPI have names like somepackage-XXtar.gz
. How does pip know what X
s are? Ie how does it detect the URL of the archive to download?
I believe PIP relies on the containing directory being readable/listable. It then uses that directory listing to know all versions of the package, it's then easy to work out what the latest version is.
For example: https://pypi.python.org/packages/source/D/Django/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.