this post was submitted on 05 Oct 2024
73 points (100.0% liked)

Linux

48216 readers
1320 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

What software have you found particularly frustrating or difficult to configure on Linux?

you are viewing a single comment's thread
view the rest of the comments
[–] JustTesting@lemmy.hogru.ch 9 points 1 month ago* (last edited 1 month ago) (1 children)

pyenv and pyenv-virtualenv together solves this for me. Virtualenv with specific python versions that work together well with other tools like pip or poetry.

It boils down to something like

$ pyenv install 3.12.7
$ pyenv virtualenv 3.12.7 myenv
$ pyenv activate myenv

and at that point you can do regular python stuff like pip installing etc.

[–] JubilantJaguar@lemmy.world 5 points 1 month ago (1 children)

If you're having to type out version numbers in your commands, something is broken.

I ended up having to roll my own shell script wrapper to bring some sanity to Python.

[–] JustTesting@lemmy.hogru.ch 2 points 1 month ago* (last edited 1 month ago) (1 children)

You misunderstand, the first two commands are just one time setup to install a specific python version and then to create an env using that version. After that all you need is `pyenv activate myenv´ to drop you into that env, which will use the correct python version and make sure everything is isolated from other environments you might have.

You can also just create an env with the system python version, but the question was specifically about managing multiple versions of python side by side and this makes that super easy.

You could also combine it with direnv to automatically drop you into the correct environment based on the folder you are in, so you don't have to type anything after the initial setup.

[–] JubilantJaguar@lemmy.world 1 points 1 month ago (1 children)

The issue is more general. When dealing with, say, apt, my experience is that nothing ever breaks and any false move is immediately recoverable. When dealing with Python, even seemingly trivial tasks inevitably turn into a broken mess of cryptic error messages and missing dependencies which requires hours of research to resolve. It's a general complaint. The architecture seems fragile in some way. Of course, it's possible it's just because I am dumb and ignorant.

[–] jdnewmil@lemmy.ca 2 points 1 month ago

When you come across some Python code for something written 5 years ago and they used four contributed packages that the programmers have changed the API on three times since then, you want to set up a virtual environment that contains those specific versions so you can at least see how it worked at that time. A small part of this headache comes from Python itself mutating, but the bulk of the problem is the imported user-contributed packages that multiply the functionality of Python.

To be sure, it would be nice if those programmers were all dedicated to updating their code, but with hundreds of thousands of packages that could be imported written by volunteers, you can't afford to expect all of them them to stop innovating or even to continue maintaining past projects for your benefit.

If you have the itch to fix something old so it works in the latest versions of everything, you have that option... but it is really hard to do that if you cannot see it working as it was designed to work when it was built.