Problems With the Python 3 Ecosystem
jamespulec.comI've been using Python 3 for all new projects for over a year. It was painful in the beginning, but my recent experience has been very rewarding. The few libraries that I use that have not been ported have, in almost all circumstances, been replaced by better libraries—I presume that this explains the lack of motivation to port the old ones.
That said, there are respected programmers who have good criticisms of Python 3[1] that are more level-headed than this sensationalized article; however, that has not stopped the community at large from moving to Python 3 where possible.
Also, as myself and others continue picking up LXC technology (Docker) the issue of host/ops dependencies interfering with project dependencies will gradually vanish—which is the only legitimate point made by the posted article. The title should have been: "My first day with Python 3"
[1]: http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/
A few months ago I attended PyCon SG (Singapore). At some point one of the presenters[1] asked for a show of hands how many people were using Python 2, and how many Python 3. The ratio was about 10 to 1 in favor of Python 2, with hundreds of respondents.
Python 3 just doesn't have traction, and it may never get there. It's sort of a shame how Python 2 is now in maintenance-only mode, but on the other hand it's great for professionals: we don't need to worry about the language or the reference implementation changing ever again.
[1] Kenneth Reitz, as part of his excellent talk "Python 2.7 & Python 3: A Sacred Love Story."
Here's the talk https://www.youtube.com/watch?v=skYBOXE02OQ
Periodically I check my requirements.txt with https://pypi.python.org/pypi/checkmyreqs, but there's usually at least 7 or 8 minor packages and 2 or 3 major ones that are unsupported.
I don't really mind moving my own code to python 3, but I'm loath to move working library code.
You could solve that problem by not using Ubuntu: SmartOS, Debian, and OS X all have perfectly functional Python 3 packages. (as I'm sure many distributions and operating systems do)
This has very little to do with Python 3.
Archlinux defaults to python3 (the default python is just a symlink), and most of the things are pretty good, though there are plenty of python2 related problems, and problems because of the devs patching the upstream distro too much...
All in all it's quite okay, and definitely on the right path.
Ubuntu is one the most deployed server distributions of linux, and one of the most battle tested. While this post isn't meant to criticize python 3 (I think the language is perfectly fine as is), it's meant to criticize the ecosystem, where one of the most deployed distributions doesn't work.
Yes, but Debian is also very widely deployed and doesn't ship with a broken Python 3 package. I'm just pointing out that your issue is specifically related to Ubuntu. You'd be better off calling your article: Ubuntu is Not A Suitable Platform for Python 3 Development, or something along those lines.
Actually, this exact issue was also an issue in Debian. The bug reports can be found further down in an answer to the same stackoverflow question. It may now be fixed, I'm not sure.
The issue linked was against jessie/sid. Debian users expect broken things outside of stable.
The Ubuntu release in question was the LTS Ubuntu.
CentOS is arguably the most deployed server distribution of Linux, and it (RH) ships a perfectly fine python3 via SCL.
Ubuntu is a snapshot of Debian unstable, and it's not surprising that shipping cutting edge packages results in a few that are broken.
>This has very little to do with Python 3.
Which is the point of the article and P3's biggest problem: All the things surrounding it.
The people behind Python seems desperate to push everybody to Python 3, mostly by telling people how much better Python 3 is than Python 2. But the thing is, that doesn't matter when the environment surrounding Python 3 is considerably worse than for Python 2.
If you ask me to switch OSes in order to do something, there has to be a very strong value proposition to get me to risk the time.
Using Anaconda solved all this for me.
To summarize the article:
Author stumbles upon problems with ubuntu and some other third-party software => concludes that Python 3 is not being used anymore.
Well done, sir.
Python strikes me (as a Perl, Haskell developer) as the boring scripting language, which I consider to be a feature. Golang, not Python 3 is the obvious successor for people who want One Way To Do Everything.
Ruby was the obvious successor to Perl, rather than Perl 6, but I wonder if Rust ends up being Perl's natural successor. It's fast, there are awesome functional features, and Perl developers tend to be pretty comfortable with the general concept of references... Not going to appeal to the "hack it to get it done quickly" crowd, but as a replacement for bigger Perl 5 projects...
Rust is a statically-typed systems programming language. A language where deal with pointers and manage memory. In the way of purpose and design, Rust has next to nothing in common with Perl, Ruby, Python, etc. I don't understand these comparisons, but then again I don't get the comparisons between Rust and Go either.
We should be comparing Rust to modern C++, Nim, etc.
I do feel comfortable with your Go / Python comparison, though. Not insofar as intent, but rather in the people that are adopting it and in the places it is being deployed. Golang seems to be carving out an interesting little niche between managed and dynamic languages.
Rust, on the other hand, looks like it can (will?) steal C++1x's thunder. Games, browsers, applications, operating systems... I really want to write new stuff in Rust.
This is the top-rated reply to my initial comment, so I'll try and fill in the gaps.> In the way of purpose and design, Rust has next to > nothing in common with Perl, Ruby, Python, etcPeople choose Python instead of Perl because - and the reason they give may be different, but it comes down to the same thing - there's one RIGHT way to do everything. There's a _pythonic_ way to do everything. PEP 8 not only exists, but people take it _seriously_. Python code is predictable, and while people will bring different engineering approaches to bear on certain problems, good Python looks the same at every company.
Go is the Next Level Up of that. "go fmt" and "go vet" are baked right in. The language is small, and explicitly leaves out certain constructs in order that there is one, clear, obvious way of doing things. In short, Go code is meant to be predictable, and good Go code should look the same everywhere.
If you want to spend your time thinking about the problems, solving the problems, and zero time decorating your art, Python and Go are for you. They are the International Style or architecture, they are Brutalist languages, and that's not only OK, but it's a fundamental part of their success.
Me? I like Baroque.
I like my sigils, I like combining functional and imperative constructs in ways that I think look beautiful as I write them. I like cute tricks, and coworkers can see code I wrote because I come back to my favourite beautiful and intuitive idiomatic patterns over and over again, just as I can identify their code for what they do. I don't think `map` is a dirty word, and I love starting with a list and whittling away at it, sorting it, reshaping it, exercising the differences between lists, arrays, hashes, and the coercions between those.
You go to the back of the Camel book, and it gives you four different code styles, depending on what you're optimizing for. Perl Best Practices is the most controversial book ever written.
I'm still a Rust baby, but I'm telling you, it TASTES like Perl. The language "features" thing is reminiscent of someone suggesting you shouldn't buy an iPhone based on processor speed.
Personal opinions of what languages are "boring" aside: "Golang, not Python 3 is the obvious successor for people who want One Way To Do Everything."
Uhh, what? I'm not even sure why you're comparing Golang to Python. One is a compiled language that specializes in concurrency and the other is a interpreted scripting language. They're for completely different purposes. Python3 was never intended to be a "one way to do everything language".
That isn't the first time such a comparison has been made, and the people making it are always remarking more on the culture surrounding the language than its implementation details (not that the latter are irrelevant, but Python certainly could be a Compiled Language™ if Guido so chose). The takeaway here is that both Go and Python codebases lend themselves to team efforts between early contributors and new arrivals, because the set of idioms you'll find is very consistent from one codebase to the next. This promotes a certain confidence in teams working on very large projects, as well as tools that must be maintained for a long period of time. It's a hard thing to measure. You certainly won't identify it just by asking what features the language has.
>Python3 was never intended to be a "one way to do everything language".
Python's motto is "There should be one-- and preferably only one --obvious way to do it." - its not meant that Python should be the only tool, but that written python code should only have one have common implementation. (https://wiki.python.org/moin/TOOWTDI)
Golang also seems to share the same ideal when it comes to written code.
I don't see any similarities between Perl and Rust at all.
> Golang, not Python 3 is the obvious successor for people who want One Way To Do Everything.
If Go had generics, I'd be inclined to agree with this.
I don't understand how a single anecdote about a packaging issue on a single distro is being used to draw the conclusion that "Python 3 Isn't Being Used More".
It isn't being used to draw that conclusion. The article starts with that premise and uses an anecdote to illustrate one reason why. In marketing and customer service, the plural of anecdote may not be data but it is is a broad trend.
EDIT: Title changed from "Why Python 3 Isn't Being Used More" to "Problems With the Python 3 Ecosystem"
Sorry but this misses the point. The biggest reason Python 3 isn't being used is because most libraries haven't been updated to support it.
I feel like the balance has tipped in the past six months. I started my current project two years ago and stuck with Python 2 because I was concerned about library compatibility.
The Python 2 standard library is now showing its age. Limitations with the multiprocessing module on Python 2 drove me to look into the possibility of switching to Python 3 and I was pleasantly surprised to discover all ~45 packages my project depended on had been ported (through caniusepython3.com.)
Porting to 2/3 compatible code with python-future.org turned out to be fairly painless so I expect to make the change soon.
The transition has been a painful one, but I'm sure that these sort of problems will feel a thing of the past in a year or two.
Check out https://python3wos.appspot.com/ . The majority of major packages have been ported over. Most of the bigger stuff is often run independently and not actually imported by other code (sentry, supervisor, ansible... to name a few).
That situation has improved. For a long time, the libraries for a MySQL database and for parsing HTML were completely different on Python 2 and 3. Now, at least, there are libraries for those operations that work on both platforms. It's taken years for that to happen, though. I'm considering porting a production Python 2.7 system, and it now looks feasible to convert it to using different packages on 2.7, then convert to Python 3.x.
Agree with the other people replying. I tried twice in the past to switch but always got stuck at some important nonported package. Recently, however, I jumped in and was mesmerized that i) most packages worth installing are already ported to py3, and ii) py3 has some sweet things that I didn't got with 2.7 that make it worth it.
That may have been the reason awhile back, but it's not the case for the vast majority of projects these days. Though the stigma may still be a major cause for lack of traction.
Yeah, I had these problems too. I had a problem where I was following the instructions for some Django tutorial and by accident I was always invoking the python 2 interpreter when I should have been running the python 3 interpreter. Death by a thousand cuts.
Hey James,
Good to see your post on the front page, and it was a nice writeup. Personally for me the issue with Python 3 has been the lack of support by many good 3rd party Django apps. Until that happens I can't see myself moving anytime soon.
Note: edited, other people made the other points I made
Digressive: "Always wanting to be cutting-edge, I decided I would would start with ubuntu 14.04", shouldn't that be 15.04 then? (latest I could see in the mirrors at least)
Perhaps the title should be altered. My main argument is that the ecosystem around python3 is what's holding it back. I think the language itself is perfectly ready, and even most major packages have been ported over.
The daily builds of the 15.04 alpha may be on the mirrors but what he meant was cutting-edge stable. Had he used an unstable daily build, his arguments would have been much less relevant.
I agree that going for the actual cutting edge would be a bit silly, but mentioning "cutting edge" and then using just the latest LTS (noting that 14.10 also exists), seems a bit silly to me.
This is a complaint about the Ubuntu 14.04 python3 package, not Python itself
True, it's an incredibly personal and situational post with him using the word "me" throughout. The title choice is just really poor it seems.
Although I'm someone who doesn't develop in python, I have toyed around with the packages and versions for dependencies for other projects and tools I use. At first I assumed that "latest is greatest" but recently came to understand that it's not the case as far as practicality is concerned. Perhaps it is involved with the rather irritating versioning (python3, pip3, etc. - I've found the same thing to be true on archlinux), but I think a lot of it is definitely as somebody else said above, the lack of updated libraries.
If you are Asian, you will feel better in python 3.
The moderation on titles is killing me.
There was no moderation on this title, nor on the post in any way.
Interesting. The title originally read: "Why Python 3 Isn’t Being Used More"
If this wasn't moderated, then my apologies.