10 ms·
A lot of people are mentioning Apple removing scripting languages at the same time as Windows is adding it. The stub is nice for learners. But ultimately I like
by neuland 7y ago
A lot of people are mentioning Apple removing scripting languages at the same time as Windows is adding it. The stub is nice for learners. But ultimately I like Apple's decision to remove them. You should not be relying on system installed interpreters, because you end up with an ancient, unmaintained version. And you are co-mingling all your dependencies with whatever else is installed. Everyone should be using virtualenv. And it should be easier to use virtualenv.
- anthony_barker 7y agoDisagree... there is tops of vbs around. why? It's default. Fought with a bank for months to use python but ended up with perl scripts on Solaris back in the day... Why? Perl came with Solaris. Having a trusted base and scripts that are easily auditable is good from a infosec perspective.
- m463 7y agoI've seen lots of companies do what Apple is doing, and it always makes the platform less valuable. Why can't Apple just install a few languages and keep up with them? It will basically kill them on the platform if they're not in common use. I suspect the people making these decisions believe it's good for apple's brand, but I think it will lead to an inward-looking insular culture.
- sys_64738 7y agoTherein lies python’s biggest weakness. You effectively are containerizing the runtime to be sure your code will work. This is why languages like C++ are compiled to platform executable or why Java has byte run code (or whatever it’s called).
- IshKebab 7y agoTo be fair even with C++ you have to distribute some dependencies, e.g. MSVCRT. It's just that that is a lot easier and more efficient than distributing a copy of Python with every program that uses it, which is what currently happens on Windows.
- mkup 7y agoThere's no need to distribute MSVCRT dependency if CRT is linked statically (/MT or /MTd C++ compiler option vs /MD or /MDd C++ compiler option).
- adrianN 7y ago> you end up with an ancient, unmaintained version Only if your system isn't getting any updates. It would be up to Apple to provide a recent version.
- deleted 7y ago[deleted]
- dep_b 7y agoBut Apple updating the version would break scripts that were relying on particular version's features.
- deleted 7y ago[deleted]
- delfinom 7y agoBut at the same time, Microsoft is actually throwing people at the task to maintain it meanwhile Apple is letting them languish. Why discourage it if there are active maintainers? Are you saying that Linux is also doing it wrong? Python packages often come from distro maintainers and not python devs?
- neuland 7y agoI believe that it's the Python Software Foundation that is controlling the install and maintaining updates. But more broadly speaking, I'm not sure that's going to be enough. Even if you're using virtualenv's, having something installed at the system level means it's shared by all the software you're using. There's bound to be some incompatibility eventually. And then you're stuck waiting for one piece of software to support the latest version of Python. So, you have to keep putting off updates. I think a better solution is to use something to set the python version for each program (ex. pyenv or docker).
- sigzero 7y agoApple is removing them. Good choice I think.
- lalaithion 7y agoYeah, Linux is doing it wrong. I hate that I can't get a new version of python on my machine because the distro maintainers haven't gotten around to it.
- panpanna 7y agoYou can.
- sansnomme 7y agoUpdating and replacing system Python takes tremendous blood and treasure. Compiling python from scratch, updating symlinks, resolving dependency issues and finally debugging the whole thing is no small endeavour. Been there, done that; never again. (This was on a Ubuntu LTS system)
- rubber_duck 7y agoThis will pull python down from the app store which is a community maintained package and installed just like any other store app. It has nothing to do with Apple scenario where system included interpreter is vendor supported and used by other OS components, this is just a built in shortcut for the store version if python is not installed.
- ilikehurdles 7y agoAgree completely. It would be interesting to see how many installs there are of n/nvm/rvm/rbenv/virtualenv with only one version of scripting language installed. Often the version bundled with the system is too out of date or too locked down in root directories for users who just want something simple.
- JeremyBanks 7y agoUpdating Python once a year shouldn't be too much to ask of a company like Apple, and is adequate for 90% of users. I shouldn't need to install pipenv and virtualenv if I want to drop into a scripting environment once a month. These tools aren't (or at least shouldn't be) only meant for professional engineers.
- BuckRogers 7y agoThat's not the case here, according to the link. There is no and will be no no system installed interpreter in Windows. It's just directing people who enter 'python' or 'python3' on a CLI to a package on the Microsoft Store.
- linuxftw 7y ago> You should not be relying on system installed interpreters, because you end up with an ancient, unmaintained version What? The reason to use the distro-provided python package is because it's maintained by someone and gets you security updates. If Apple is just shipping a version and never bug fixing that version, well Apple sucks. As it happens with Python, they do micro releases which other upstream projects might not. But, those releases might take longer than, say, a Linux distro might to get the fixes out to their users. So, while developing on an upstream codebase might be nice, what you need to focus on is the deployment lifecycle of your project.
- 013a 7y agoRemoving them from MacOS was the right decision for MacOS, but only because Apple never maintained it. If Microsoft can provide a good distribution channel and maintain it, this is a fantastic move. And the Windows Store is a fine distribution channel, and Microsoft recently has been very on-top-of this kind of thing.
- mixmastamyk 7y agoIt is important to note that the Windows version is just a link to the latest version. They aren't shipping it.
- WorldMaker 7y agoYup, the Store page is coming from MSIX packages being built from most of the same CI/build systems that produce the official builds on python.org.
- monocasa 7y agoIDK, we were looking at using python in our .pkg's postinstall script instead of bash. I guess know we're going to have to use something compiled.
- jrs95 7y agoMaybe we can get them to include virtualenv by default too :)
- slig 7y agoIt's included by default since 3.3 <https://docs.python.org/3/library/venv.html> https://docs.python.org/3/library/venv.html>.
- deleted 7y ago[deleted]
- rossdavidh 7y agoIt depends on who you're talking about. There is an attitude of, "if you can't install a virtualenv as step 1 in learning how to do python, you don't deserve to learn python". Not, I would hope, consciously thought of in that way, but that's the practical affect. I use virtualenv. When I was first learning to program, and I believe python is a better choice for a first language than PHP or Javascript, it would have been a substantial obstacle to have to do the virtualenv route first. Yeah, it's easy if you've done it and know how to figure out what the problem is if something goes wrong. It's an obstacle if you're just starting out, and I think keeping the on-ramp simple is very important for the long-term health of a language community. Which suggests that, because python's on-ramp just got easier, it's long-term prospects just got better.
- RussianCow 7y agoIf you're just learning, you don't need to mess around with virtualenvs; you can install Python via the official Windows installer and install packages globally. I don't feel like installing something is a very big initial hurdle to overcome, as opposed to having it be pre-installed (but potentially very outdated in the future).
- naniwaduni 7y agoOn the contrary, installing something is the biggest hurdle after perhaps coming up with the idea that there's something here to be learned at all. And sometimes it's part of the latter.
- neuland 7y agoWell, I don't have that attitude. Lately, I push beginners towards repl.it so that they don't need to install anything or setup an IDE. There, each script/program is completely separate. So it avoids this issue entirely. Then, when they're a bit more familiar with programming, they can transition to a good local environment like PyCharm or some other setup that manages python versions, virtualenvs, etc. What I'm saying is that bundling a specific Python interpreter and separate package environment should be the default. I'm not sure what it'd take to get there for a vanilla python install. But more system-level interpreters is not it. Currently, the way I know of to do that is pyenv [0]. And I know PyCharm let's you pick a python version when you start a project (though I don't use pycharm so that may not be true anymore). [0] https://github.com/pyenv/pyenv https://github.com/pyenv/pyenv
- jchw 7y agoWell, to be fair using the system interpreter is Exactly what we do on Linux.
- yingw787 7y agoI was going to agree with you. But then I remember one scene in high school. I was talking to a friend who coded in IB American History and asked him how to get started with Python. He said just go to this website and download this tarball. I had no idea what a tarball was and was afraid it contained something bad. So I didn't download it and didn't play with Python until a few years later in college. If I had started playing with Python earlier, my life could be a lot different. I was not a guy back then who made programs on TI-84 calculators; I thought that was magic. I was planning on econ/finance. I used Windows (!) and didn't know anything about what Unix was, and barely knew about OS X. It's hard to see why some decisions pan out and some don't; if you install a system version of Python how would the general public / PSF know how many people use it? But I don't think that's a good enough reason to remove system installs entirely. I think my younger self would have liked it.
- gattilorenz 7y ago> If I had started playing with Python earlier, my life could be a lot different. I was not a guy back then who made programs on TI-84 calculators; I thought that was magic How come you didn't start playing with the TI-84 programming language instead? There's no more "battery included" than that, and it's not a pun only: you can program and run on the calculator (not a GREAT way to program it, but quite a nice way to spend your time instead of paying attention to the class :^) ) if you bought it new I guess you had a paper manual for the language (I had one for my TI-89), and there's so little you need to learn and take care of (libraries, dependencies, versions, execution bit, paths... None of these are an issue the novice user will be confronted with. It's like a C64 all over again).
- yingw787 7y agoA number of good points. At the time I took (I think) 5 IB higher-level courses as a junior/senior, as well as a pretty tough art curriculum, and economics competitions as extracurricular activities. There wasn't a lot of energy I could afford to something that didn't require my primary attention and time. Another big reason is the inability to quantify my fears and the ability to divide and conquer them, which is a problem I still have.
- masklinn 7y ago> A lot of people are mentioning Apple removing scripting languages at the same time as Windows is adding it. I think a big difference here is expectations: the Apple way is to have the tool itself installed, which creates various expectations with respect to presence and capabilities (or the lack thereof). Because microsoft only adds a hook / stub, there's no expectations that the tool will be present (as by default it's not), it just makes it easier to enable the tool.
- wvenable 7y agoI also agree with Apple's decision and I was bit surprised that Microsoft would go the other direction until I read the article -- they also not bundling Python with the OS -- they're just putting it in the store and adding some stubs.
- brudgers 7y agoYou should not be relying on system installed interpreters, because you end up with an ancient, unmaintained version. That's how Apple does it. Ubuntu LTS, Debian Stable, CoreOS/Redhat, etc, are useful because the old versions of the software are maintained. Though Windows has not traditionally bundled GNU or Open Source packages, it is also built with a strong commitment to long term maintenance: consider Notepad,MSPaint, and .NET. Microsoft is including Python 3.7 which has planned support until at least 2023 and possibly 2026 https://www.python.org/dev/peps/pep-0537/#lifespan https://www.python.org/dev/peps/pep-0537/#lifespan
- WorldMaker 7y agoAdditionally, this is an "App" Store release that can update independently of the OS (and at least at this point in time Windows itself doesn't have a dependency on it). Also, as the post sort of points out, this is being built by the Python community itself (rather than by Microsoft directly; contrasting with the distro model), using mostly the same CI/build infrastructure they already use for the builds at python.org and presumably may be as up to date as the Python team wishes it to be.
- PascLeRasc 7y agoI'm desperately in need of a guide on how to un-fuck my Python setup. On my Mac I have several versions of the default shipped Python, brew-installed versions of 2 and 3, and Anaconda-installed versions of 2 and 3, and I have no idea which I'm getting when I call 'python3' or 'ipython', or what should be being used. Substitute brew for apt and it's the same situation on Ubuntu. It's really confusing and means I have to troubleshoot dependencies for any Python project I try to run.
- nrclark 7y agoSo - on my Linux machine, I shouldn't trust /usr/bin/python? There goes probably 10% of the software I can apt-get install.
- znpy 7y ago> You should not be relying on system installed interpreters, because you end up with an ancient, unmaintained version. On the other hand, if you can bundle dependencies with your code, you are sure that a certain version of the language will be present and to some degree, you can just rely on that.
- holografix 7y agoHonest question: I just use `python -m venv my_env` and then I use source to activate it.
- LeoPanthera 7y agoApple is only removing Python 2, not Python 3.
- dragonwriter 7y ago> You should not be relying on system installed interpreters No one seems to have a problem with that if it's bash. You definitely shouldn't be willy-nilly modifying the environment of system interpreters, but relying on them for ops-like uses and bootstrapping dev environments is sensible.
- afiori 7y agoMy understanding is that Python break backwards compatibility (or forward compatibility) comparatively more often than bash. The problem with OS interpreters is entirely linked to stability and portability indeed regarding bash, many suggest to avoid bashism as much as possible and be posix compliant.
- y4mi 7y ago> 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 and python3 commands that take you directly to the Python store page. i guess Microsoft agrees with you