Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Nick Coghlan
On 10 November 2017 at 16:55, Michel Desmoulin
 wrote:
> ensurepip may depend of youself having an internet connection when you
> install it. And without a proxy. And it's not used on debian flavours.

No, ensurepip doesn't depend on internet access (by design - it's the
main reason why CPython bundles the wheel files).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin


Le 07/11/2017 à 14:06, אלעזר a écrit :
> On Tue, Nov 7, 2017 at 2:45 PM Nick Coghlan  > wrote:
> 
> On 7 November 2017 at 03:52, Michel Desmoulin
> mailto:desmoulinmic...@gmail.com>> wrote:
> 
> > And assume that stuff in any tutorial you make they know this stuff.
> >
> > This is a strong barrier or entry IMO.
> 
> Sure, but it's not one we can readily fix - the user hostility of
> command line environments and the compromises we have to make to abide
> by platform conventions are in the hands of operating system vendors,
> and there's only so much we can do to paper over those distinctions
> when user lock-in and putting barriers in the way of cross-device
> portability is a core part of commercial OS vendors' business models.
> 
> 
> I don't know if you are referring to Microsoft Windows here, but I want
> to note that from my personal experience the Windows subsystem for Linux
> ("Bash on Ubuntu on Windows") is easy to work with, so making Windows
> feel (CLI-wise) like Ubuntu is not so difficult. I'm not sure how easy
> it is for students to set up, but it is an option at least.
> 

It doesn't solve anything:

- requires windows 10
- requires having the several Go install first
- mix windows and linux, making the whole thing confusing to beginers
- we still have the heterogenous setup between the 2 os being a problem.

I love WSL, but it's not a solution to that particular problem.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin


Le 07/11/2017 à 14:08, Paul Moore a écrit :
> On 7 November 2017 at 12:44, Nick Coghlan  wrote:
>>> - make sure the system path is correctly set
>>
>> Recent python.org Windows installers do this automatically, but there
>> are unfortunately still lots of ways for things to go wrong.
> 
> I believe the latest installers switch it off again, because one of
> the ways things can go wrong is that stuff put at the start of the
> user path is still lower priority than stuff in the system path, and
> we now default to user installs. This is an actual problem with mixed
> python.org and Anaconda installations, for example - Anaconda adds
> itself to the system PATH, and overrides a default user install of
> python.org Python. So you can't prioritise python.org over Anaconda
> without manual path hacking. (This hit me when I installed Visual
> Studio and selected "include Python (Anaconda)" - I can't recall the
> exact option, but it broke my python.org install).

So what you are saying is that even if you do the right things,
something the user may do could possibly reverse it.

I don't see that as a reason not do to the right thing.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin

> Which is why we advise getting into a virtual environment ASAP, such
> that the only platform specific thing folks necessarily need to learn
> to get started is how to get to that first working virtual
> environment.
> 

You can't start by teaching virtualenv. I tried. It doesn't work. And
it's a terrible prerequisit if you write docs, tutorial, teaching
materials, etc.

>> - install pip manually on linux
> 
> s/Linux/Ubuntu/
> 
> Other distros (like Fedora) provide pip by default.

s/Ubuntu/Debian derivates

Debian, Ubuntu, Linux Mint, Linux Tail, etc.

> 
>> - make sure the system path is correctly set
> 
> Recent python.org Windows installers do this automatically, but there
> are unfortunately still lots of ways for things to go wrong.

Just gave a training for python 3.6 this week. It doesn't. You need to
explicitly check a box to do so. Box that no beginer would ever check
without being told to. Actually a box that some of my students even
don't check despite being emphatically told to.

> 
>> Stuff that they will forget on the next install, or miss when changing
>> plateform
> 
> Yes, because computers are awful, and incredibly user hostile. We
> don't have a magic wand to wave to fix that.

No, but we can make some adjustment to make lifes easier. For this
particular issue, checking the box by default would help beginners.
Sysadmin not wanting it would understand the problem and be able to take
the proper decision.

> 
>> And assume that stuff in any tutorial you make they know this stuff.
>>
>> This is a strong barrier or entry IMO.
> 
> Sure, but it's not one we can readily fix - the user hostility of
> command line environments and the compromises we have to make to abide
> by platform conventions are in the hands of operating system vendors,
> and there's only so much we can do to paper over those distinctions
> when user lock-in and putting barriers in the way of cross-device
> portability is a core part of commercial OS vendors' business models.

That is  avery pessimistic that would prevent use from making any
progress in any thing. All the other participants offered at least 3
solutions to problems. They are workable. They may help. We should try them.

> 
> This is a big part of why mobile client devices with cloud backends
> are so popular, even for development purposes: they allow for a much
> simpler developer experience that avoids decades of accumulated cruft
> in the desktop operating system command line experience. Even there
> though, you're faced with the fact that once you choose a provider,
> whatever you do there will probably be locked into that provider and
> not transferable elsewhere.

I agree.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin


Le 07/11/2017 à 22:26, Paul Moore a écrit :
> On 7 November 2017 at 20:38, Chris Barker  wrote:
>> On Tue, Nov 7, 2017 at 5:04 AM, Thomas Jollans  wrote:
>>>
>>> As Ivan said earlier, perhaps the Windows installers should provide a
>>> "python3" executable, so "python3 -m pip" works everywhere.
>>
>> absolutely! I really, really thought it did (I'm amazed I never heard
>> from a single student getting bit by that...)
> 
> On Windows, use py -X.Y to select the exact version of Python you
> want. Maybe Unix should have a launcher like this, too? It doesn't
> really need to be any more complex than
> 
> 
> exec pythonX.Y $@

That's my whole point. We should find a way to unify each of those issues.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin

> 
> there can be multiple python2 or 3s too...
> 
> at least with:
> 
> python? -m pip install
> 
> you will get the pip that matches the python you use...

Not on windows. You have the py command. My all point is that each of
the specific issues I mentioned are A and B but not C propositions. It's
not unified.

> 
> with ensurepip, having pip no installed in a python is getting less
> common, so maybe this isn't needed anymore, but

ensurepip may depend of youself having an internet connection when you
install it. And without a proxy. And it's not used on debian flavours.

> 
> -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 
> 
> 
> ___
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
> 
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin



> Isn't pip installed by default on Windows and OSX? On Linux some
> distribution will probably do something unexpected and mess up your
> grand plan.

Some installers download pip, which won't work if you don't have an
internet connection or a proxy setup.

But my point is, all this should be unified. All the points I mentioned
worked in a A and B but not C, or a combination of those, different for
each point. This is very unfortunate to write docs, tutorials, or any
teaching material.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin


> 
> I.e., Install under the "Python 3.6" start menu an additional
> "Python command prompt", which will
> start cmd.exe with an appropriate PATH so that python and pip
> run without further prefix.
> 
> That way, the installer still doesn't need to mess with global PATH and
> you can
> easily have multiple versions of Python, each with their own
> "Python command prompt" submenu.
> 
> At least for Windows users this would simplify the situation a bit.


They already do that on windows. But adding "yet another way" to do
things differently on different OS doesn't feel like a solution ot me.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Looking for input to help with the pip situation

2017-11-09 Thread Michel Desmoulin


Le 06/11/2017 à 23:48, Chris Barker a écrit :
> On Mon, Nov 6, 2017 at 9:52 AM, Michel Desmoulin
> mailto:desmoulinmic...@gmail.com>> wrote:
> 
> I know and you still:
> 
> - have to use py -m on windows, python3 linux, python in virtualenv...
> 
> 
> can't you use python3 -m pip install .
> 
> everywhere?

No: on windows you don't have python3, you have py -x.x. On linux you
can't pip install, you need --users, admin rights or a virtualenv.

> 
> That's what I tell my beginner students to do, and I've never had a
> problem. (nce they got Python installed right in the first place) For that:
> 
> The python.og installers for Windows and Mac pretty much 
> "just work"

Nope. E.G: in windows, if you don't check "add python executable to
system path" people won't be able to type "python" in the shell. It's
unchecked by default.

> 
> Linux is a different story, but Linux users are more comfortable with eh
> whole idea of command lines and packages, etc -- so my Linux users have
> never been the hangup.

Not anymore. There is a wave of beginners arriving in an industry using
linux but being unfamiliar with the system. The problem is not that it's
hard. The problem is that it's work to discover it. The first Python
experience should be simple and straight forward.

Another problem is that it's not portable knowledge from an OS to another.

> 
> If/when I'm teaching data analysis for scientific computing, I go
> straight to conda, but for basic python, and most web Development,
> pyton.org  python and pip work great.

You can't teach conda first. It's not portable knowledge and would not
let students benefit from the mass of online tutorials that use pip and
virtualenv.

> 
> A also DO NOT introduce virtualenv right off the bat -- it is another
> complication that is critical to real development, but not important for
> learning python.
> 
> I have done it it the past -- it did not go well
> 
> What's too bad now is that so many docs say "pip install the_package",
> and users with multiple python installs can get burnt. (though most don't)
> 

My point exactly.

> -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 
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


Re: [Python-ideas] Any chance on (slowly) deprecating `eval` and `exec` as builtins?

2017-11-09 Thread Michel Desmoulin


Le 07/11/2017 à 22:39, אלעזר a écrit :
> 
> 
> בתאריך יום ג׳, 7 בנוב׳ 2017, 22:59, מאת Chris Angelico
> ‏mailto:ros...@gmail.com>>:
> 
> 
> -1 on hiding eval/exec; these features exist in many languages, and
> they're identically dangerous everywhere. Basically, use eval only
> with text from the owner of the system, not from anyone untrusted.
> 
> 
> I am sorry. I don't understand the reasons you are giving here. One
> sentence is a fact, and I agree with the other, so I must be missing
> something.
> 
> Elazar 
> 
>
Also: why are eval and exec even builtins ? Builtins are for stuff you
use often. I never saw in my entire career anybody use it often.
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/