Live data from Hacker News

Using both Python 2 and 3 in Windows

spapas.github.io

21–30 of 44 posts

Re: Using both Python 2 and 3 in Windows

#21
post #2

You know what? I appreciate the authors drill-down into the "how" of this issue but I'd like to focus on the "why". Why, has it taken so long to get off of python2.x- noted I understand that a few libraries cough twisted cough have been holding projects back that depend on them. But I haven't wrote a single block of code in half a decade that wasn't python 2.x and python 3.x compatible. At what point will we exclusiv…

no one mentioned this, and maybe I got things wrong, but python 3 is significantly slower than python 2. at least this is certainly true using spyder (maybe its not in other cases)

laptop py 2.7 (4 cores 3ghz, 16 gb ram) vs desktop py 3.5(6 cores 4.5 ghz, 64 gb ram) - both windows. When I am running my models for kaggle competitions, my laptop usually finishes first by about 20% total time, unless the model I am running can take advantage of my GPU.

edit: I never figured out why, but if I generate a submission with 3.5x, 75% of the time its accuracy is significantly worse.

Re: Using both Python 2 and 3 in Windows

#22

A missing point here: If you have an accent in your username on windows, you are welcome to a kingdom of pain due to pip inability to process paths with non-ascii chars.

On a side note, who’d put an accent on its username? Any person with minimal programming knowledge could imagine how bad idea that is.

Re: Using both Python 2 and 3 in Windows

#23
post #2

You know what? I appreciate the authors drill-down into the "how" of this issue but I'd like to focus on the "why". Why, has it taken so long to get off of python2.x- noted I understand that a few libraries cough twisted cough have been holding projects back that depend on them. But I haven't wrote a single block of code in half a decade that wasn't python 2.x and python 3.x compatible. At what point will we exclusiv…

The real reason is that the Python community has been TOO NICE. NodeJS and Ruby broke everything. What did they do ? They said "move your butt" and gave a small windows of time. Everybody moved. Python ? We gave 10 years. Created tools. Tutorials. A way to write Python 2/3 compatible programs. Then gave 5 more years. The result ? Nobody moved for 9 years and spread FUD on how hard it is. But the reality is: most peop…

The way I remember it is that people were complaining about all the changes in Py2 that were breaking their code all the time. So it was decided to leave Py2 alone and do all the breaking stuff on Py3. The staticness of Py2 made it an attractive target for new development. As a result Python became very popular.

So if they had of just broke everything that very easily could of been the straw the broke the camel's back. Python would not of achieved the popularity it did.

I think the fundamental error here was the idea that languages become popular because of some fundamental quality of the language as a language. That never really happens. It is always something else. In the case of Python it was the "Batteries Included" thing. It came with a whole whack of functionality in the form of libraries written in other languages. No one much cared about the details of the framework for getting at that functionality.

Re: Using both Python 2 and 3 in Windows

#24

A missing point here: If you have an accent in your username on windows, you are welcome to a kingdom of pain due to pip inability to process paths with non-ascii chars.

Well, I am greek so accents would be the smallest of my problems if I tried to use my actuall name as a username (Σεραφείμ) :)

Installing stuff on directories containing characters that are not plain-old ASCII letters and underscores (for example there are huge problems when installing things on directories with spaces in Windows) is a major no-no and I didn't even think of mentioning it.

Re: Using both Python 2 and 3 in Windows

#25

A missing point here: If you have an accent in your username on windows, you are welcome to a kingdom of pain due to pip inability to process paths with non-ascii chars.

On a side note, who’d put an accent on its username? Any person with minimal programming knowledge could imagine how bad idea that is.

Computer asks you to enter your name, you enter your name, name gets used as user name. Seems quite reasonable all around.

Re: Using both Python 2 and 3 in Windows

#26
post #2

You know what? I appreciate the authors drill-down into the "how" of this issue but I'd like to focus on the "why". Why, has it taken so long to get off of python2.x- noted I understand that a few libraries cough twisted cough have been holding projects back that depend on them. But I haven't wrote a single block of code in half a decade that wasn't python 2.x and python 3.x compatible. At what point will we exclusiv…

I write things in Python 2. No mac comes with Python 3 installed. So, if I want to distribute simple scripts, I can either send a file and say "run this", or I can give a long list of instructions to install Python 3. Similarly, many linux distributions still don't, or only very recently, started distributing Python 3. I don't know of any place which would have Python 3 and not Python 2. So, the question is, why shou…

Well, as I write in the article, Django 2.0 was a turning point to me. I was always using Python 2.7.x and was really happy with it but, since Djano 2.0 does not support python 2.x anymore I have been forced to move to Python 3.x in order to be able to write Django 2.0 apps.

Yes I know that Django 1.11 (which works with Python 2.7.x) will be supported until 2020 but, out of principle, I don't want tostart a new project with the previous Django version. Upgrading my old Django projects to 2.7.x is another (rather painful) story of course ...

Re: Using both Python 2 and 3 in Windows

#27
post #21
post #2

You know what? I appreciate the authors drill-down into the "how" of this issue but I'd like to focus on the "why". Why, has it taken so long to get off of python2.x- noted I understand that a few libraries cough twisted cough have been holding projects back that depend on them. But I haven't wrote a single block of code in half a decade that wasn't python 2.x and python 3.x compatible. At what point will we exclusiv…

no one mentioned this, and maybe I got things wrong, but python 3 is significantly slower than python 2. at least this is certainly true using spyder (maybe its not in other cases) laptop py 2.7 (4 cores 3ghz, 16 gb ram) vs desktop py 3.5(6 cores 4.5 ghz, 64 gb ram) - both windows. When I am running my models for kaggle competitions, my laptop usually finishes first by about 20% total time, unless the model I am runn…

Very interesting anecdote, perhaps something wrong with the build?

I know that my python3 saltstack returners return before the python2 ones.

I have not done probing as to the exact performance profile of py2 vs py3 though- I would be surprised if python3 was actually slower though- unless it's to do with the UTF-8 everywhereness or something.

Re: Using both Python 2 and 3 in Windows

#28
post #21
post #2

You know what? I appreciate the authors drill-down into the "how" of this issue but I'd like to focus on the "why". Why, has it taken so long to get off of python2.x- noted I understand that a few libraries cough twisted cough have been holding projects back that depend on them. But I haven't wrote a single block of code in half a decade that wasn't python 2.x and python 3.x compatible. At what point will we exclusiv…

no one mentioned this, and maybe I got things wrong, but python 3 is significantly slower than python 2. at least this is certainly true using spyder (maybe its not in other cases) laptop py 2.7 (4 cores 3ghz, 16 gb ram) vs desktop py 3.5(6 cores 4.5 ghz, 64 gb ram) - both windows. When I am running my models for kaggle competitions, my laptop usually finishes first by about 20% total time, unless the model I am runn…

Caan you show some numbers and profiling?

Re: Using both Python 2 and 3 in Windows

#29

A missing point here: If you have an accent in your username on windows, you are welcome to a kingdom of pain due to pip inability to process paths with non-ascii chars.

On a side note, who’d put an accent on its username? Any person with minimal programming knowledge could imagine how bad idea that is.

As I have a minimal programming knowledge I dont use windows as my dev machine. I am just stating some problems that you can face if you use your real name. For example, I was working for a contractor once and they all had windows machines with pregenerated users. Mine had an accent in the username.

Re: Using both Python 2 and 3 in Windows

#30
I think this is why Docker is so darn useful.

Once you embrace it, using Python 2.x or 3.x on Windows (or MacOS, or Linux) involves changing 1 line in 1 file and you're pretty much done. Each app you develop can also use whatever version you want with total isolation.

There's no Windows hoops to jump through or virtual environments to create.

Post reply on HN