Two Python paths
As I wrote previously, Python is at a bit of a fork in the road as to where it’s headed as a modern language. The latest indicator of changes is the two biggest operating system tools bundlers for developers, Apple and Microsoft.
Packaging and distributing Python itself, as well as Python applications, has always been an enormous pain.
Why is it so confusing? Let’s take a dip into how Python installs work. When you buy a computer, regardless of what it runs - Mac, Linux, or Windows - it comes with a bunch of stuff pre-installed on it. The basic thing that’s installed is the operating system - macOS, Linux, or Windows 10. On top of the operating system are applications, i.e. Word, Photoshop, and programming languages.
In any given OS, there’s a systems folder that tells you which programming languages are available. For Mac, for example, the programming languages that came bundled by default previously were:
AppleScript, JavaScript for Automation, Perl, Python, and Ruby -- plus the UNIX shell (bash).
But the Python version was 2.7, which is now in serious deprecation. So, if you wanted to install Python 3, you could either download it directly, do it through Homebrew, or do it through something like Anaconda. Each of the three ways would lead to pain because of the way the Python interpreter…interprets which Python you’re pointing to. Two Pythons meant twice the level of pain.
Windows comes with C++ and (mostly now) .NET. Python was something you had to install in the darkness of the night of a new moon, throw in an eye of salamander, set the Python Path variable, and hope to God it all worked.
So, if you were looking to get started with Python out of the box on either system, you were in for a Real Bad Time. In spite of this, Python’s popularity as a programming language has meant that both major OS providers that developers use (macOS and Windows, Linux being a small minority of local systems, although used heavily in production/cloud settings and a whole separate story), were sorely missing native options for getting started with the latest Python immediately.
That changed recently.
Apple’s main developer conference, WWDC, was last week, and in a small footnote that was overshadowed by cheese graters and moving emojis with Airpods (seriously I still can’t get over the fact that someone worked nights and weekends on this feature), Apple announced that it was deprecating default support for Python 2.7 (as well as other scripting languages) in the next release of its macOS, 10.15, Catalina:
Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)
Use of Python 2.7 isn’t recommended as this version is included in macOS for compatibility with legacy software. Future versions of macOS won’t include Python 2.7. Instead, it’s recommended that you run
python3
from within Terminal. (51097165)
What does this mean? The default Python will be taken out, and if users want to install Python at all, they’ll have to do so on their own. At a first glance, this sounds like a huge pain, but will actually make things much easier: instead of fighting both with 2.7 and 3.x, you can start from a completely clean slate and mess up Python 3 on your own.
At the same time, Microsoft, announced that it would be headed in a completely different direction, and include a Python executable by default.
Microsoft has been involved with the Python community for over twelve years, and currently employ four of the key contributors to the language and primary runtime. The growth of Python has been incredible, as it finds homes among data scientists, web developers, system administrators, and students, and roughly half of this work is already happening on Windows. And yet, Python developers on Windows find themselves facing more friction than on other platforms.
If you’re already a Python expert with complex needs, you probably know how to install and use it. It’s much more likely that someone will hit this problem the first time they are trying to use Python. Many of the teachers we spoke to confirmed this hypothesis – students encounter this far more often than experienced developers.
So we made things easier.
Finally, with the May 2019 Windows Update, we are completing the picture. While Python continues to remain completely independent from the operating system, every install of Windows will include
python
andpython3
commands that take you directly to the Python store page.
What does this all mean? It’s easy to read the tea leaves as Mac hates developers, its core audience, (which it’s already proven with its hardware). But really what it sounds like to me is that they’re just cleaning things up and making cleaner environments out of the box, which is their general aesthetic, anyway. Developers already trust Apple, anyway, from the perspective of it being easier to use to install command-line applications and utilities, so this is just giving them more latitude to do what they need to do to do work.
Microsoft, on the other hand, is following its own historical M.O. of being aggressively hands-on for users, and really trying to prove, as it has been for the past couple years under Satya, that it’s all in on open source, Python, and the future, and doing it in its own way, which is bundling, both in the OS, and in applications like the ever-growing-in-popularity VS Code. Hopefully this means they’ll bundle Python 3.7 and vigorously keep it updated.
In a way, it’s a reverse flip for the companies - Apple used to be all about the curated experience - iTunes, the App Store, etc, and Microsoft has more been about letting the user kind of bumble along on their own. Remains to be seen which direction both head in, with this as a leading indicator.
Art: The Two Fridas, Frida Kahlo, 1939
Links
A good Twitter thread on what Python students should learn before machine learning
It is really hard to fact-check non-fiction books and as a result we get glaring errors
Saving 90% of my income for my parents
Good old Reddit: What is the dumbest thing that someone has done that you know of that got them fired from an IT job?
About the Author
I’m a data scientist in Philadelphia. Most of my free time is spent kid-wrangling, reading, and writing bad tweets. I also have longer opinions on things. Find out more here or follow me on Twitter.
If you like this newsletter, forward it to friends!