logoalt Hacker News

thaynelast Thursday at 5:24 PM1 replyview on HN

pip isn't exactly a "built-in" tool. Beyond the python distribution having a stub module that downloads pip for you.


Replies

zahlmanlast Thursday at 10:07 PM

`ensurepip` does not "download pip for you". It bootstraps pip from a wheel included in a standard library sub-folder, (running pip's own code from within that wheel, using Python's built-in `zipimport` functionality).

That bootstrapping process just installs the wheel's contents, no Internet connection required. (Pip does, of course, download pip for you when you run its self-upgrade — since the standard library wheel will usually be out of date).