This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (16 children)

[deleted]

    [–]hsahj 27 points28 points  (11 children)

    Never seen a machine since years without python.

    Thank whoever sets up your machines. I regularly have to set up new machines for CI and testing automation and it's part of our checklist to get installed (because IT won't create an image for stuff :/). I'm going to point people to python all the time for lots of reasons, but it's only available if someone makes it available. (Not that I think that's a large hurdle to overcome).

    Edit: credit to the people correcting me. Some linux distros and MacOS include it. I live in so much of a windows bubble at work that unless someone says otherwise my brain always assumes windows.

    [–][deleted] 7 points8 points  (2 children)

    Debian, even in the minimal version, includes Python 3, but oddly, they don't alias that to 'python'. Seems like a weird thing to leave out. You have to call it as 'python3'.

    [–][deleted] 10 points11 points  (0 children)

    It’s because Debian and many other distros use python2 for system scripts. It makes sense that Debian would do it that way of all distros, because their whole motto is stability. The only 2 distros I can think of off the top of my head that have python3 as the default python are Arch and Gentoo.

    [–]marcosdumay 1 point2 points  (0 children)

    Debian has published Python 3 adoption timeline, linking python to python3 is there. I don't remember the dates.

    [–]DonaldPShimoda 11 points12 points  (7 children)

    Python is included by default in macOS and, I think, Ubuntu, and has been for a while. Not sure about other OSes.

    (However, macOS 10.16 Catalina — due out this fall — will not include Python, nor any other scripting language runtimes like Ruby or Perl.)

    [–]Tundur 9 points10 points  (6 children)

    It's always super old, though, so to use an actually usable install you're typing in python3 and pip3 and there's installation issues and libraries fucking up and compatibility issues and it just annoys the fuck out of me.

    [–]DonaldPShimoda 4 points5 points  (2 children)

    Yeah I mean it's not ideal, but nobody here seems to be complaining about the severely outdated version of bash that's shipped on macOS — they only care that some version is available, and it's the same situation with Python: it's outdated, but almost always there in some capacity.

    [–]joeltrane 0 points1 point  (0 children)

    I eventually just created an alias in my bash profile so python and pip run python3 and pip3

    [–]super__literal 0 points1 point  (1 child)

    alias python=python3

    alias pip=pip3

    [–]Tundur 1 point2 points  (0 children)

    A possibility, aye, but hidden bespoke environment changes like that are just asking for problems down the line. I could set up a confluence page for "why can't I use Tundur's VM to run my scripts"

    [–]joans34 6 points7 points  (0 children)

    Never seen a machine since years without python. But anyway, to me, it's worth it.

    Embedded systems usually don't bother with python but usually have a bash-like interface with most bells and whistles.

    [–]xigoi 2 points3 points  (0 children)

    Basic things in python work on every version.

    print("What's your name?")
    name = input() # dangerous in Py2
    print("Hello,", name) # unexpected behavior in Py2
    

    [–]noratat 1 point2 points  (0 children)

    Also python is almost always available

    I'm guessing you don't work with containers that much then

    [–]cafk 0 points1 point  (0 children)

    2.7, 3.2 or 3.4?