Hacker News new | ask | show | jobs
by Tehchops 2714 days ago
>Almost all my colleagues struggled with setting up python 2 und 3 correctly at some point, whereas this just worked for me on Linux.

This is one area where I'd have to concede the Apple experience is objectively suboptimal.

However, the Python ecosystem isn't doing anyone any favors here.

4 comments

Languages and platforms generally are best supported on linux. Clojure, haskell, python, anything except the platform provided by the Apple/Microsoft is easier to configure on linux.

C++ ecosystem sucks a lot when you have to build 5 libraries using 5 different building systems. Linux package managers do that for you.

Yet VC++ offers much better tooling, including pre-compiled headers, incremental compilation and linking, experimental support for modules, C++ friendly OS APIs, and a package manager actually written in C++.
And a project config system that will break everything at the slightest provocation! Seriously, setting up even moderately complicated multi-project solutions usually results in days lost to figuring out why x library isn't linking with y project. The editor is great, the build system is somehow worse than make/cmake.
Nowadays MSVC has a built-in cmake integration (a bit like vscode). You can open a folder with CMakeLists.txt and it will mostly work.
Yes, if you can justify using cmake on Windows. Most customers want an MSVC project though it seems.
And then you want to use that library that isn't a msvc project.

Or, God forbid, you want to use clang or gcc. Or intel's whatever.

Intel is compatible with MSVC++, using binary libraries is quite common on the PC world since MS-DOS days.

Plus there are DLLs and COM libraries as well.

> However, the Python ecosystem isn't doing anyone any favors here.

Apple isn't, either. They ship a version of Python by default that is woefully out of date and conflicts with any other Python that you install, and what's more, some of their tools (notably, LLDB) freak out if you have a newer Python on your $PATH.

Except you forgot Apple ships Python 2.7.15, which was released in 2018. It's actually quite up to date.
My Mac on Mojave ships with Python 2.7.10 which was released May 23, 2015.
maybe it is right now. But in my experience they usually don't keep them up to date very well
Sounds like RHEL 7...Unless you enable Software Collections.
RHEL 8 is moving to Python 3, though, with a Python 2 binary kept for system tools that still need it.
I have struggled occasionally with the various Linux package managers not being able to resolve Python library conflicts/dependency conflicts. Like, really, things where you wonder how possibly could there be a conflict, such as scipy not being able to update because matplotlib ver whatever being needed by some other lib that interoperates with scipy but itself is updatable something something something.

I'm still not sure I know the best way to install Python packages. It seems someone has something bad to say about any given method (pkg mgr, pip, venv, etc).

I just use nix on OS X, better package manager than most linux distros have. I have my own copies of py2/3 and the system one, not a huge deal to be honest (outside of the pain of linux side nixos updates breaking derivations for macOS, but thats generally not a fault of the os).
The issue I have with Nix, vs a combined MacPorts+Homebrew is that Nix is a pain to get working. The time investment required for Nix is too high.
Last time I tried Nix I eventually got the Nix environment working, but ran into MacOS-specific issues trying to install relatively common development-related packages like Ruby and PostgreSQL.
It's waaaay better than it used to be. A couple of years ago there were a lot of impurities which would cause everything to break whenever macOS was updated. But these days it just uses libSystem from macOS and the rest is managed by nixpkgs.
No argument there, I definitely agree, however its easily my favorite package manager. And lets me keep nixos config similarly.