The libraries. Ruby has Rails. Python has... everything else (plus Django, so it also kinda has "a Rails"). You'll likely be using something less well-maintained and shakier if you use Ruby outside of Rails stuff, than if you'd picked Python. Python's basically the modern Perl.
Why that all happened, IDK.
I write that as someone with a soft spot for non-Rails Ruby (after much consideration and repeated encounters, I kinda hate Rails). But it's rarely the best choice, unfortunately.
I'd reckon the parent's suspicion about the scientific community is correct in that it was a large influence. When ML and deep learning blew up, the academic Python community was in a great position -- you had numpy and scipy early on (both optionally BLAS and LAPACK btw), then scikit-learn for ML, matplotlib for plotting results, open CV ports, etc. As for why Python was adopted so early by the scientific community, I'm not sure. Maybe because it was a scripting language that was also very friendly for hooking to C and Fortran?
I genuinely love Python. Not in a shallow feature-to-feature way. But deeply that it has enabled a career and provides a livelihood to me and my family. It puts bread on the table. It taught me how to program and it taught me the power of computers.
Life changing tool. No other tool in my house comes close to what computers + python has done in my life.
Oh, I like it too. It's got problems like most languages that see any actual use, but it's totally OK, even good. I didn't intend my post as a put-down of Python, so if it came off that way—whoops, not what I was going for.
Why that all happened, IDK.
I write that as someone with a soft spot for non-Rails Ruby (after much consideration and repeated encounters, I kinda hate Rails). But it's rarely the best choice, unfortunately.