Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Python OS X Apple

Apple Finally Removing Python 2 In macOS 12.3 (macrumors.com) 70

Apple will no longer bundle Python 2.7 with macOS 12.3, according to developer release notes for the upcoming software update. MacRumors reports: Python 2 has not been supported since January 1, 2020 and no longer receives any bug fixes, security patches, or other changes. Apple says that developers should use an alternative programming language instead, such as Python 3, but it's worth noting that Python 3 also does not come preinstalled on macOS. Developers can run the stub /usr/bin/python3 in Terminal, but it prompts users to install Xcode developer tools, which includes Python 3.
This discussion has been archived. No new comments can be posted.

Apple Finally Removing Python 2 In macOS 12.3

Comments Filter:
  • I never knew Python was installed at all.
    • The fact that it was installed by default on older macs was one reason it was used by some of us. It's a pain to tell developers how to install all the myriad tools used for a product build, and having one that's just there by default is handy. I know some tester once made a tool using Ruby and the other testers were highly annoyed at the time about the hoops to jump through to get it installed and running.

      • by DarkOx ( 621550 )

        except Ruby has shipped as part of MacOS for a long long time too.

        • Ah right. The problem I think was the tester used a newer version that he downloaded and used features not in the pre-supplied version.

      • by sodul ( 833177 )

        We use pyenv to install python, much more control than using brew, since other brew packages will end up installing a different version than what you want. You get access to newer releases faster as well.

    • by jythie ( 914043 )
      The command line version and its associated libraries are there. It used to be used by the OS, no clue if it still is though. The installed version was not really intended for user development though.
  • Why should we have to install the Xcode bloatware just to have Python now? Sure, no doubt Brew can do it or you could build from source but much nicer to have it out the box and it's not as if it takes up much space.

    What next, unix shells and Terminal itself become optional extras?

    • Most Linux distros have made the same choice to remove any default Python interpreter. If software and scripts have nontrivial dependencies and interfaces that could break with updates, thatâ(TM)s the developerâ(TM)s job to maintain and not the operating systemâ(TM)s.
      • Some essential tooling on Gentoo and Red Hat-based systems is Python-based, so those systems would need Python, although they need not, necessarily, use the "system/default Python."

        I'm starting to see the advantages of not depending on a system/default Python in the more general case, as there are too many things that can break from one version to the next, not the least of which are improperly updated pip packages. Better to use pyenv or some other mechanism to tie each script to the correct Python versio

    • You can just install the XCode command line tools - without the full XCode - to get stuff like python, make, gcc, etc.

      Actually make may already be installed - it's been a while so I don't remember which tools are there by default and which get added by the command line toolset.

    • by teg ( 97890 )

      Why should we have to install the Xcode bloatware just to have Python now? Sure, no doubt Brew can do it or you could build from source but much nicer to have it out the box and it's not as if it takes up much space.

      What next, unix shells and Terminal itself become optional extras?

      It will just install the command line tools, not the entire Xcode eco-system. Another way to do it is to just install Anaconda instead... As for shells, I'm guessing some people will be very annoyed that bash is no longer the default shell on MacOS. Zsh is - the shell I knew and loved decades ago.

    • Brew needs Xcode too. Or at least Xcode command line tools. At least if installing from scratch, as opposed to update an existing one. Mac Ports too, which is more stable than Brew is I thnk. Now maybe that's not bad, but getting Xcode command line tools is a major pain if you don't want an Apple account or developer ID.

      As for shells, if you start an interactive Bash in Catalina it warns you that you should be using zsh instead :-)

  • by Waffle Iron ( 339739 ) on Friday January 28, 2022 @04:09PM (#62215989)

    I could never get Python to work on Apple devices anyway.

    print (â(TM)Hello world!â(TM))
    File â(TM)<stdin>â(TM), line 1
            print (â(TM)Hello world!â(TM))
                    ^
    SyntaxError: Invalid syntax

  • by jddj ( 1085169 ) on Friday January 28, 2022 @04:32PM (#62216073) Journal

    ...unless you'd build a 20-storey office building to get a Starbucks.

    Get the latest python 3 from python.org. there's a Mac installer, and you're getting the current official one (something that Apple has been pitiful about providing since jump. Maybe a wealthier company could afford to do it well...)

    Then you might try PyCharm community edition for an IDE. It's pretty awesome even in the free community edition, and if you need the full Django and other framework support the pro version offers, the licence fees are not onerous.

    And you don't have to sign an Apple NDA just to develop.

  • by OrangeTide ( 124937 ) on Friday January 28, 2022 @05:44PM (#62216235) Homepage Journal

    It will make your life easier. But you have to download and install Xcode first before you can use it.

    Sure I could have written it in Bash, Perl, Awk, or C and saved you the hassle of installing gigabytes of stuff to run my 10 line script. Don't you like the feeling of using a throw away tool that is written in a modern, elegant language?

  • I have seen so much horrible handling of Unicode text that comes out of high level languages that don't make it hard to do the wrong thing. That's a major example, and there are others. For me as for many others, Python 3 was a painful upgrade that was worth it.

    The newly mandated parens on the built in print statement didn't seem 100% necessary, except I guess as long as they were breaking things they might as well make the language self consistent and elegant. So (shrug).
    • Python3 should never have been. It fucked up Python development for many, many people for small gains that could better have come with incremental release of Python 2. It is acknowledged by most people to have been a disaster, one that Python is only now recovering from.
      • One can argue that the Python3 rollout was done badly, but it is very hard to argue that Python2 had not accumulated enough ongoing breakage that a new version with potentially breaking changes was needed.

        How else in your view could we have gotten those fixes? How would you have incrementally improved 2 until it eventually became 3?

  • by joe_frisch ( 1366229 ) on Friday January 28, 2022 @11:09PM (#62216809)
    This is another example of how python is great for quick scripting but its not good for projects that will be operating for long periods of time. (industrial, scientific instruments and the like). Developing new versions is great, but dropping support for legacy versions seems a bad idea
  • Apple has been stripping down their operating system pretty much from the moment that they achieved full Unix certification.
  • All the lame developers who demanded a Mac from their boss because they wanted a shiny baubel like the art guys had can now hang their heads in shame and STFU.

It is easier to write an incorrect program than understand a correct one.

Working...