LWN: Comments on "Linux distributions and Python 2" https://lwn.net/Articles/756628/ This is a special feed containing comments posted to the individual LWN article titled "Linux distributions and Python 2". en-us Sat, 18 Oct 2025 14:39:28 +0000 Sat, 18 Oct 2025 14:39:28 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Linux distributions and Python 2 https://lwn.net/Articles/848433/ https://lwn.net/Articles/848433/ foom <div class="FormattedComment"> In python3 you can&#x27;t really rely on ranges or indexes on strings either, because you never know if you will be splitting a unicode grapheme cluster and creating something broken.<br> <p> But, it works most of the time… it will just fail when unexpected unicode sequences appear (combining accents, or emoji skin tone modifiers, or flags, or ...)<br> <p> Contrast this with perl6, which has built in support for correctly preserving grapheme clusters in it&#x27;s string methods.<br> </div> Fri, 05 Mar 2021 16:15:48 +0000 Linux distributions and Python 2 https://lwn.net/Articles/848430/ https://lwn.net/Articles/848430/ LtWorf <div class="FormattedComment"> It helps in knowing how to not write buggy code that handles encodings.<br> <p> Anyway for &quot;random data in the world&quot; python3 is way better than python2. Which is why the change was made.<br> <p> In python2 you couldn&#x27;t really rely on ranges or indexes on strings, because you never knew if you would be splitting a unicode sequence and creating something broken.<br> <p> But, it worked most of the times… it would just fail when unexpected unicode sequences appeared.<br> </div> Fri, 05 Mar 2021 15:59:37 +0000 Linux distributions and Python 2 https://lwn.net/Articles/848368/ https://lwn.net/Articles/848368/ pizza <div class="FormattedComment"> &quot;go read a tutorial&quot; does not change the data your python3 code encounters out in the real world.<br> </div> Fri, 05 Mar 2021 12:02:12 +0000 Linux distributions and Python 2 https://lwn.net/Articles/848366/ https://lwn.net/Articles/848366/ LtWorf <div class="FormattedComment"> One could go and read a 10 minutes tutorial…<br> </div> Fri, 05 Mar 2021 11:22:00 +0000 Linux distributions and Python 2 https://lwn.net/Articles/799987/ https://lwn.net/Articles/799987/ LtWorf <div class="FormattedComment"> They work but are very error prone, because characters might take any amount of elements, so you have all sort of issues when doing cycles or manipulation.<br> <p> With unicode objects, you know that they are not array of bytes and a conversion is needed, and you get an error if you didn't do the conversion that you were supposed to do.<br> </div> Thu, 19 Sep 2019 16:11:53 +0000 Linux distributions and Python 2 https://lwn.net/Articles/767423/ https://lwn.net/Articles/767423/ cclauss Adding <b>from __future__ import division</b> will print a fractional result in both Python 2 and Python 3.</p> Changing <b>/ --&gt; // </b> will print zero in both Python 2 and Python 3. Tue, 02 Oct 2018 09:09:06 +0000 Linux distributions and Python 2 https://lwn.net/Articles/767422/ https://lwn.net/Articles/767422/ cclauss With <b>456</b> days until Python 2 end of life, today's stats are: <pre> 408 distros with Python 3.4+ ============================ 105 distros with Python 3.4 160 distros with Python 3.5 122 distros with Python 3.6 21 distros with Python 3.7 https://github.com/Mariatta/python_versions_and_distros </pre> Tue, 02 Oct 2018 08:59:40 +0000 Linux distribution without Python 2 https://lwn.net/Articles/759938/ https://lwn.net/Articles/759938/ cstratak <div class="FormattedComment"> AFAIK gnome-doc-utils has been deprecated in favour of yelp-tools [0], so it might be easier to just use that. Is there a publicly available place where we can track the porting of gnome-doc-utils?<br> <p> [0] <a href="https://wiki.gnome.org/Projects/GnomeDocUtils/MigrationHowTo">https://wiki.gnome.org/Projects/GnomeDocUtils/MigrationHowTo</a><br> </div> Mon, 16 Jul 2018 14:52:33 +0000 Linux distributions and Python 2 https://lwn.net/Articles/758509/ https://lwn.net/Articles/758509/ anselm <p>Yes.</p> Thu, 28 Jun 2018 13:15:13 +0000 Linux distributions and Python 2 https://lwn.net/Articles/758490/ https://lwn.net/Articles/758490/ larslehtonen <div class="FormattedComment"> Go is the real Python 3. Is that still at all controversial?<br> </div> Thu, 28 Jun 2018 06:24:00 +0000 Linux distributions and Python 2 https://lwn.net/Articles/758083/ https://lwn.net/Articles/758083/ codewiz <div class="FormattedComment"> Well, it does matter for both performance and memory usage, which are observable properties of a program as much as its output.<br> <p> Earlier versions of the C++ standard intentionally left some things unspecified to give implementations a certain degree of freedom in when choosing the internal representations of data structures, etc. Turned out it was a terrible idea in practice, because some implementations, including GCC, chose to make std::string copy-on-write with reference counting, some had a small-string optimization which would save an allocation, and others would append the \0 on the fly only when someone invoked c_str(), occasionally causing the string to be reallocated.<br> <p> This caused portability issues where a valid and idiomatic C++ program which would normally execute in 1 second on Linux could take hours and run out of memory on a different standard-compliant run-time which would copy all the strings. And there was no reasonable way to fix the performance bug without causing unpredictable performance regressions in other valid programs.<br> <p> What I'm getting to here is that the performance characteristics of strings, dictionaries and lists is part of the contract. Even if left unspecified, a lot of code in the wild will start depending on it. And once you specify the exact behavior and complexity of all the basic operations on a container, this leaves very little room for changing the internal representation in a significant way.<br> <p> Over time, Python 3 grew some clever string optimizations to mitigate the overhead of converting strings on the I/O boundary. But these optimizations are inherently data dependent. Let's say I want to read a 100MB html file into a string and then send it over a socket. This will take roughly 100MB of RAM in Python 2, while a Python 3 program will jump from 100MB to 400MB after someone inserted a single emoji in the middle of the file.<br> <p> While dynamic, garbage-collected languages are expected to have less predictable runtime behavior, the idea that user-controlled input can undo an important optimization that doubles or even quadruples memory usage is terrifying.This could even be used as a DoS vector against Python servers running in containers with hard memory limits. For similar reasons, dicts typically employ a cryptographic hash function to prevent DoS attacks based on causing too many collisions, which would trigger worst-case O(n) lookups for every key.<br> <p> And this is just one of the several issues that a clever internal representation will bring over a simple one. Another tricky one that comes to mind is round-trip of utf-8 and other encodings, including input containing invalid codepoints. I've seen Python backup software which failed to restore an archive due to a filename containing an invalid utf-8 character (that file came from AmigaOS which didn't have utf-8, and I never noticed because all cli tools simply handled the filename without trying to read too much into it :-)<br> <p> These are the kind of concerns you wish a good language runtime would hide from you, so you don't need to audit your codebase to make sure nobody accidentally used the built-in string class to read arbitrary user input. Go and Rust took the simple and elegant approach of declaring that strings are internally represented the same way they're represented externally. Python 2 was essentially already the same way, so isn't it weird that it was perceived as a defect so serious to justify a 10-year long migration to get it fixed?<br> </div> Sun, 24 Jun 2018 14:40:09 +0000 Linux distribution without Python 2 https://lwn.net/Articles/757688/ https://lwn.net/Articles/757688/ awilfox <div class="FormattedComment"> As lead of Adélie, which was formed in 2015, I've had the true privilege of not packaging Python 2 ever.<br> <p> We have migrated literally every Py2-requiring package we've dealt with to Py3, and most of it is done in under a day. We always send those patches upstream, as well.<br> <p> The only sticking point has been gnome-doc-utils, which has a Py3 port in progress, but there's still some issues with it. I'm hopeful we'll be able to ship docs with our Gnome packages some time in 2019 at their current rate.<br> <p> We have a tracker bug for software that incorrectly uses /usr/bin/python instead of python3, as well, and that's going to need to be handled eventually: <a href="https://bts.adelielinux.org/show_bug.cgi?id=41">https://bts.adelielinux.org/show_bug.cgi?id=41</a> Just haven't had the time yet.<br> <p> My rationale for this has always been that we should not be shipping known-deprecated software, nor should we be "propping up" bad practices such as continuing to rely on known-deprecated software.<br> </div> Sun, 17 Jun 2018 10:56:37 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757668/ https://lwn.net/Articles/757668/ epa <div class="FormattedComment"> Does it really matter how the Python 3 implementation represents Unicode strings internally? It could use UTF-8, or UTF-16, or UCS-4, or even some wacky encoding of its own, and in principle you wouldn't notice any difference. I think what you are saying is that there should be an easier implicit conversion between byte strings and Unicode strings, with UTF-8-ish encoding and decoding rules used by default.<br> </div> Sat, 16 Jun 2018 18:39:50 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757664/ https://lwn.net/Articles/757664/ lsl <div class="FormattedComment"> Except that Python 2 strings aren't ASCII and support Unicode perfectly well: you just put UTF-8 inside them.<br> </div> Sat, 16 Jun 2018 16:33:22 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757612/ https://lwn.net/Articles/757612/ togga <div class="FormattedComment"> <font class="QuotedText">&gt; Good luck finding devs willing to work on py27 projects.</font><br> <p> My experience is the opposite. With a py3 project, you are almost guaranteed to end up in an encoding hell. For me, py3 projects raises the "over-engineered" or "system architecture by syntax convenience" flags and you may find yourself in a world of software pain.<br> <p> </div> Fri, 15 Jun 2018 15:28:24 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757611/ https://lwn.net/Articles/757611/ togga <div class="FormattedComment"> Your comment actually makes a case for migrating from python altogether. I've done many attempts on py3 over the years and in most cases py3 is a regression, especially when using python as a glue- pr scripting language. Syntax candy and numerous ways to workaround a broken threading model doesn't make up for the downsides.<br> <p> Start try to reuse existing python modules from another more "down to earth" language like go and then migrate away is my tip. Python language is obviously not long term stable. <br> </div> Fri, 15 Jun 2018 15:13:11 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757566/ https://lwn.net/Articles/757566/ nirbheek <div class="FormattedComment"> So the same as Linux then?<br> <p> py.exe on Windows solves a completely different issue: where is Python installed and how do I invoke it? All pythons (2, 3.4, 3.5, etc) are called python.exe, so putting it in PATH is not an option.<br> </div> Fri, 15 Jun 2018 06:47:39 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757547/ https://lwn.net/Articles/757547/ togga <div class="FormattedComment"> <font class="QuotedText">&gt; well, it won't happen in py2.7, that's certain</font><br> <p> <a href="http://pypy.org">http://pypy.org</a><br> </div> Thu, 14 Jun 2018 20:12:01 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757535/ https://lwn.net/Articles/757535/ Cyberax <div class="FormattedComment"> JFYI, my native language is Russian so I’m acutely aware of encoding problems since so many of them were used for Cyrillic scripts. I can speak Ukrainian and understand Polish and Czech. I’d used to be able to speak German but haven’t practiced it in decades and lost most of it. Now I’m also studying Mandarin Chinese for a change.<br> <p> Static annotations are nice, but are kinda beside the point.<br> </div> Thu, 14 Jun 2018 17:21:42 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757491/ https://lwn.net/Articles/757491/ LtWorf <div class="FormattedComment"> <font class="QuotedText">&gt; it's the same old Py2 with added inconvenience</font><br> <p> Something tells me that you never ventured outside of writing English, because in any other language, having strings in unicode rather than ASCII is a huge improvement.<br> <p> Then, Python3 has type annotations, which lets you use mypy to do some static checks on the code.<br> <p> I wrote typedload (<a rel="nofollow" href="https://github.com/ltworf/typedload">https://github.com/ltworf/typedload</a>) to load json-like data into typed data structures, so that once loaded, you know your data has the correct types and can be safely be passed around.<br> <p> My grandmother did not know how to use a computer, that doesn't mean that computers are useless.<br> </div> Thu, 14 Jun 2018 09:13:00 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757489/ https://lwn.net/Articles/757489/ danpb <div class="FormattedComment"> This doesn't even remotely work for non-trivial programs, as there's no way you can have confidence that you've exercised all code paths simply by running it and seeing what breaks. You need to use an automated analysis and/or conversion tool first to check the entire codease, and after that try to execute it and if it works. Even then for non-trivial programs there's still a good chance it is broken. If the app has good unit test coverage this can help, but that's nowhere near foolproof.<br> <p> Ideally everyone would none the less do the conversion to py3 and accept the risks/pain, but in reality I'd expect many companies will just keep around an ancient python2 version and not touch their apps/scripts :-(<br> </div> Thu, 14 Jun 2018 08:53:22 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757488/ https://lwn.net/Articles/757488/ kooky <div class="FormattedComment"> I wouldn't say you get nothing.<br> <p> I've moved several large Flask web apps from python2 to python3. It has been very satisfying.<br> <p> We were getting quite a few `unicode` trouble tickets. Fix usually just to run as python3. Changes to code usually very minor and done in a few hours.<br> </div> Thu, 14 Jun 2018 08:44:34 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757473/ https://lwn.net/Articles/757473/ lambda <p>Which interpreter is the right one to use for the following code in an executable file named <code>polyglot</code>: <pre> #!/usr/bin/python print("2/3 = {}".format(2/3)) </pre> <p>Will the output remain the same if one system decides to run it with a Python 2 interpreter and another runs it with a Python 3 interpreter? Thu, 14 Jun 2018 06:18:18 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757469/ https://lwn.net/Articles/757469/ kenshoen <div class="FormattedComment"> They look at shebang line. #!python2 to 2, #!python3 to 3, #!python defaults to 2 (configurable).<br> <a href="https://docs.python.org/3/using/windows.html#customizing-default-python-versions">https://docs.python.org/3/using/windows.html#customizing-...</a><br> </div> Thu, 14 Jun 2018 05:19:04 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757466/ https://lwn.net/Articles/757466/ lsl <div class="FormattedComment"> <font class="QuotedText">&gt; C had a moment not dissimilar to Python's, with the move from K&amp;R to ANSI C.</font><br> <p> The difference being that I can still use code written in the K&amp;R dialect and link it together with new sources into a single program. Heck, I can even use K&amp;R style as well as C11 features in the same translation unit. Sure, you get a -Wimplicit-int warning and it's a GCC thing but it works.<br> </div> Thu, 14 Jun 2018 03:55:19 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757463/ https://lwn.net/Articles/757463/ lambda <blockquote>For high quality codebases with decent test coverage the migration is straightforward</blockquote> <p>Good thing that most code out there is a high-quality code base with decent test coverage then, right? <p>I just ported a 750 line script from Python 2 to Python 3; it's only fairly recently that I've found there are enough reasons to do so (in this case, availability of Python 3 and not Python 2 in the base install of our distro, plus the typing module and mypy to add static types), and enough barriers have been removed. <p>Here are the steps I went through to make sure the port was working: <ol> <li>Run 2to3 over the script <li>Run autopep8 to fix a few issues introduced by 2to3 <li>Run pylint and flake8, fix up issues found <li>Add type annotations, check types with mypy, fix up type issues that had crept in <li>Write unit tests (this had originally been a quick script, so not covered by unit tests, but had grown enough that they'd be useful for this port), fix issues discovered by unit tests that still remained even after mypy and pylint fixups <li>Realize that I'd ported to Python 3.6, and target system was running 3.5, so set up tox and fixed up more things that differed between 3.5 and 3.6 (tests that worked in 3.6 due to deterministic dict ordering started failing non-deterministically in 3.6; thanks to tox for printing the random number seed on each test run for making that easier to reproduce and fix) <li>Actually try building my package and tests on the target system, have to fix more test issues due to an older version of pytest on the target system. <li>Finally actually run the result on the target system, and even after all of those steps above (pylint, flake8, mypy, unit tests with pretty good coverage) still have issues to fix </ol> <p>And this is for a fairly simple little script, dealing with some files which just contain ASCII text and ASCII filenames. <p>Our main codebase uses Twisted, using PB and Jelly to pass objects over the network. There were no automated tests when I started at the company, and while we've been trying to add tests for new features or code that we're touching, we still have pretty poor coverage. Additionally, it's is a networked application that also has to interact with networked filesystems on Windows, macOS, and GNU/Linux, which makes the encoding issues even more fun to deal with. Oh, and most of what is jellied and shared between systems consists of dicts, with different value types for different keys. <p>At some point, we are going to have to port this to Python 3, but I imagine it's going to take a long time, cause a lot of grief for the developers in the process, and still probably cause regressions for customers even if we're as thorough as we can be by adding unit tests, integration tests, and type annotations. Thu, 14 Jun 2018 03:48:55 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757455/ https://lwn.net/Articles/757455/ NAR <div class="FormattedComment"> I guess the big problem will be site-specific scripts created years ago that run only once in a month, but if they fail, the sysadmin will get a phone call at 2AM.<br> </div> Thu, 14 Jun 2018 00:18:50 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757426/ https://lwn.net/Articles/757426/ kenmoffat <div class="FormattedComment"> In the build system, it now invokes e.g. configure.py.<br> <p> 0:00.60 Creating Python environment<br> 0:01.54 New python executable in /scratch/working/firefox-60.0.2/firefox-build-dir/_virtualenv/bin/python2.7<br> 0:01.54 Also creating executable in /scratch/working/firefox-60.0.2/firefox-build-dir/_virtualenv/bin/python<br> 0:01.54 Installing setuptools, pip, wheel...done.<br> 0:02.27 running build_ext<br> 0:02.27 building 'psutil._psutil_linux' extension<br> <p> <p> </div> Wed, 13 Jun 2018 14:40:57 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757401/ https://lwn.net/Articles/757401/ mgedmin <div class="FormattedComment"> Where does Firefox use Python?<br> </div> Wed, 13 Jun 2018 12:19:32 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757395/ https://lwn.net/Articles/757395/ codewiz <div class="FormattedComment"> And let's not forget _MBCS, hehe :-)<br> <p> I guess Microsoft can be excused for the messy Unicode transition. They were among the first to attempt it, and at the time they were still saddled with support for a myriad of encodings from the DOS era. Oouch! :-)<br> <p> But in 2008 there was no excuse whatsoever for not using the awesome UTF-8 encoding as the internal representation of strings. It was already obvious which way the wind was blowing, and pretty much every dynamic language transitioned to UTF-8, except Python. Actually, PHP 6 also tried moving to UTF-16, but after struggling with performance regressions and compatibility issues for several years, they finally realized it was a very poor decision and ditched the entire release. Then PHP 7 came out with UTF-8 strings.<br> <p> Later programming languages like Go and Rust could have picked either UTF-8 or UTF-32 without compatibility concerns, and they still went with UTF-8 for simplicity and performance. You lose the O(1) random-access to Unicode codepoints, sure, but how often do you really do that? Whereas having to re-encode all text on the I/O boundary is a major inconvenience and causes all sort of round-trip issues.<br> </div> Wed, 13 Jun 2018 11:56:25 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757384/ https://lwn.net/Articles/757384/ excors <div class="FormattedComment"> wchar_t is a bit awkward since it can't actually hold Unicode codepoints on Windows.<br> <p> Win32 did go through an ANSI-&gt;Unicode(ish) switch (with Windows NT, I presume), and tried to make it easy for applications to migrate incrementally. If you start with char* and "strings" and strcmp() and MessageBoxA(), you can gradually replace it with TCHAR* and _T("strings") and _tcscmp and MessageBox, and it will compile exactly the same as before. Then you #define UNICODE and suddenly it all gets macroed into WCHAR*/L"strings"/wcscmp/MessageBoxW etc, and you probably get a load of build errors, and you fix some before getting bored and going back to ANSI mode. After enough iterations you might get something that compiles properly with the Unicode API. Then you probably keep the TCHAR/_T/etc macros - it seems standard practice is to use those instead of the Unicode-only versions, even if you know you're never going back to ANSI.<br> <p> I guess the difference with Python is that Microsoft saw the transition as an unending process, and they knew they would have to support the ANSI APIs forever, so they accepted the ugly macros as the cost of supporting both. Python expected the transition to finish quickly so they could kill off Python 2, so it seems they focused more on designing a nice end state (with arguable success) and less on easing the transition between the two states.<br> </div> Wed, 13 Jun 2018 10:55:47 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757377/ https://lwn.net/Articles/757377/ codewiz <div class="FormattedComment"> There's wchar_t, but it's a distinct type from char: <a href="http://en.cppreference.com/w/cpp/language/types#Character_types">http://en.cppreference.com/w/cpp/language/types#Character...</a><br> <p> While the standard doesn't even bother saying whether char is signed or unsiged, no sane C compiler would dare switching overnight the representation of C strings. Incrementally switching a large codebase from 8bit charater strings to Unicode would be nearly impossible. Pure insanity! Which is exactly why the transition to Python3 has been going on and on for the past 10 years in spite of the considerable effort the community put into it :-)<br> <p> </div> Wed, 13 Jun 2018 10:13:29 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757375/ https://lwn.net/Articles/757375/ gdt <p><i>Yeah, people still use last millennium's C versions.</i></p> <p>C had a moment not dissimilar to Python's, with the move from K&amp;R to ANSI C.</p> <p>It was one of the defining moments in the development of free software. Some popular Unixen took the opportunity to charge for their ANSI C compilers, which lead people to discover GCC and then the GNU Project's other tools.</p> Wed, 13 Jun 2018 09:08:03 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757374/ https://lwn.net/Articles/757374/ gevaerts As far as I know, a C90 compiler can can have char be a Unicode codepoint just as well as a C98 one. Wed, 13 Jun 2018 08:53:58 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757368/ https://lwn.net/Articles/757368/ codewiz <div class="FormattedComment"> I'd be surprised if anything shipped as part of current Linux distros still required to be built in C90 mode. It's there just in case, and it's very easy to support for gcc because, as other have noted, the C and C++ languages have never broken compatibility to the level that Python did.<br> <p> If C98 suddenly switched the meaning of 'char' from being an 8-bit integer to a Unicode codepoint, you can bet that we'd still be using C90 today, officially supported or not.<br> </div> Wed, 13 Jun 2018 07:54:12 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757322/ https://lwn.net/Articles/757322/ kenmoffat <div class="FormattedComment"> Yes, I was talking about building it. Last time I checked (probably about 6 weeks ago), python2 was required. If you want to link it to (some) system libs - particularly nss and system certificates - then you need to build it from source.<br> </div> Tue, 12 Jun 2018 16:46:45 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757316/ https://lwn.net/Articles/757316/ imphil <div class="FormattedComment"> Where does Firefox need Python 2? Building Firefox from source might require Python 2, but I'm not aware of anything in Firefox that requires it at runtime. Ubuntu seems to agree: <a href="https://packages.ubuntu.com/bionic/firefox">https://packages.ubuntu.com/bionic/firefox</a><br> </div> Tue, 12 Jun 2018 16:02:50 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757314/ https://lwn.net/Articles/757314/ k8to <div class="FormattedComment"> That's determining which python already ran it, not which python it needs.<br> I don't believe it's very decidable.<br> <p> </div> Tue, 12 Jun 2018 15:24:17 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757311/ https://lwn.net/Articles/757311/ rbanffy <div class="FormattedComment"> One easy way to check is to remove /usr/bin/python and fix whatever breaks by calling /usr/bin/python2.<br> <p> Anyone publishing software that depends on Python 2 to be at /usr/bin/python is just inviting a lot of future pain.<br> </div> Tue, 12 Jun 2018 14:56:49 +0000 Linux distributions and Python 2 https://lwn.net/Articles/757310/ https://lwn.net/Articles/757310/ rbanffy <div class="FormattedComment"> If the script is already compiled to a .pyc, you can probably find out which version of Python compiled it (I never tried that because, frankly, I'm very happy with having python and python3 on /usr/bin).<br> </div> Tue, 12 Jun 2018 14:53:27 +0000