For completeness' sake: accidentally sent offline.

---------- Forwarded message ----------
From: Chung Tzu-ping <uranu...@me.com>
Date: Tue, Aug 7, 2018 at 1:54 PM
Subject: Re: [Distutils] Re: Is ensurepip still a thing?
To: Chris Barker - NOAA Federal <chris.bar...@noaa.gov>


Replies inline

On 7 Aug 2018, at 23:43, Chris Barker - NOAA Federal <chris.bar...@noaa.gov>
wrote:

>> IIRC, ensurepip by design doesn't go to the internet , so it will only
>> ever upgrade to the version bundled with Python
>
> Now I’m really confused — if pip is already bundled with Python, then
> what is ensurepip for ?!?!

Yes and no. Python does not have pip pre-installed, but distributions from
python.org comes with a wheel of pip (and one for setuptools) that allows
ensurepip to install pip withou teaching the internet. The files to make
pip work is there, but not available as a module before ensurepip is run.

The purpose of ensurepip is to make the distributed wheels available as the
importable and invokable pip module and command. This is not the only way
to make pip available for a newly-installed Python, but is the way you are
mostly encouraged to do it.

>
> Or really, the question at hand: should a user starting from scratch
> with a python.org install of 3.7 run ensurepip?

Yes. It gives you the pip command and module.

>
> Or can they just go straight to:
>
> Python3 -m pip install —upgrade pip

They can’t. pip cannot be used before you install them, either via
ensurepip or other methods (not encouraged and not discussed here).

>
> ?!?
>
> -CHB
>
>
>> from the docs "To
>> ensure the installed version of pip is *at least as recent as the one
>> bundled with ensurepip*, pass the --upgrade option" [emphasis mine]).
>> To get the latest available version, you should do `python -m pip
>> install --upgrade pip` (better than `pip install...` as it works on
>> Windows) as you mentioned.
>>
>> Paul

--
Tzu-ping Chung (@uranusjr)
uranu...@gmail.com
Sent from my iPhone



On Tue, Aug 7, 2018 at 2:00 PM, Chris Barker <chris.bar...@noaa.gov> wrote:

> On Tue, Aug 7, 2018 at 9:16 AM, Donald Stufft <don...@stufft.io> wrote:
>
> Ensurepip is the mechanism that Python uses to bundle pip with Python. We
>> didn’t add pip to the stdlib, we added ensurepip to the stdlib. In 3.x the
>> makefiles and macOS/Windows installers will automatically run ensurepip
>> (however in both cases there are flags to disable running ensurepip— but it
>> defaults to On in 3.x).
>
>
> OK -- that makes sense.
>
>
>> > Or really, the question at hand: should a user starting from scratch
>> > with a python.org install of 3.7 run ensurepip?
>> >
>> > Or can they just go straight to:
>> >
>> > Python3 -m pip install —upgrade pip
>> >
>>
>> The intention behind ensurepip was that they could just go straight to
>> ``python3 -m pip install -U pip`` because the ensurepip was implicit when
>> they installed Python. However some downstream distributors have mucked
>> around with ensurepip in one way or another (ranging from not running it by
>> default, to out right disabling it).
>
>
> so I *think* that means that ensurepip still has a useful function, but if
> folks install python from the python.org installers (on Windows and OS-X)
> then they can upgrade pip right out of the box -- yes?
>
> -CHB
>
>
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> chris.bar...@noaa.gov
>



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/ZPRPGLYMYEWZQ2UFFUH44NIJ5VFLO7GO/

Reply via email to