This is the mistake. Linux and, I believe, OSX come with several tools pre-installed including python.
This is the mistake. Linux and, I believe, OSX come with several tools pre-installed including python.
If the Python version that comes with your OS is not the one you want (e.g. it's outdated), then you'll have to:
1. Install the version you want anyway, and all the tools required (that usually don't come preinstalled in the OS)
2. Try to not make them collide, which, last time I tried, was a PITA, because the OS depends on original version of Python being in the the $PATH or something.
Python on Ubuntu is notoriously misleading for newbies, because even if you apt install python3 and it tells you that it's already installed, it's not fully installed. For example, venv is not installed, you have to `sudo apt install python3-venv` and do that for every Python module that's not installed by default.
It would be easier if Linux didn't come with Python, and then people simply installed the actual, full version of Python they wanted.
Which then wouldn't work for all the repository python programs. The repo's python is what everything is built and tested against, so there is no replacing that.
EDIT: Oh and pipenv!
https://apple.stackexchange.com/questions/406244/will-macos-...
For a long time MacOS came with only Python 2.x installed. I looked up what the latest version of MacOS comes with and came across an Apple support forum post with several responses posting conflicting answers [0]. One person got an Xcode related error. Having to install a heavyweight IDE just to get a language to run correctly is the type of needless complication the parent comment is talking about.
xcode-select --install pulls in the CLT, which is a fairly reasonably sized download given that it includes various essential dev tools including python3 but without Xcode.
This is hinted at by attempting to run python3 before any install, which calls a stub prompting you to do just that.
py2/ruby/perl/etc... are part of the base OS for backwards compatibility/expectations (because they were so before Xcode/CLT were even a thing) but have been marked as due for removal from base for something like half a decade. My bet is that at some point they will move to the CLT (or some other optional download) as well.
It might be just me, but PowerShell feels outright developer-hostile even when compared to Bash. Perhaps it's their approach to rely primarily on .NET stuff which makes things so arcane, but when given the option it's far simpler and better to go with, say, python than PowerShell.
Bash is described as a "command language" and not a programming language per se.
Bash is what you use to type in commands, and automate said commands if you need to whip out a quick script that runs what you would otherwise run manually. Bash, scripting-wise, is command line glue.
If all you want to do is run commands with some logic, PowerShell is simply dreadful and outright developer-hostile. I doubt there is a single person on earth who uses PowerShell as a command shell like Bash is used.
This subthread was specifically about programming languages being available out of the box in OSs, so when you brought up bash my natural assumption was that meant as a programming language.
Expand your views. Everyone aren't you, didn't learn the same things as you and understand different things than you.
I learned some C++ as my first language, therefore I got stuck in an object oriented mindset, this translates really well to PowerShell and really poorly to bash. The thing where everything is text doesn't make sense, text isn't stable and everyone will write their own partially broken parsing implementation. In PowerShell they try to make everything an object, with type checking and other goodies, solid autocomplete for scripts being one.
In PowerShell I can deserialise JSON and perform CRUD operations on the data easily.
I'd say powershell is outright developer friendly as it brings a production grade language to the scripting table.
If powershell could parse bash completion files and integrate sudo better I'd use it as a command shell on all platforms, which right now are limited to MacOS and Linux.
PowerShell is such joy that it should be there on any Linux as default interactive shell.