Minimal linux, maximum python

is there a linux distribution geared only towards programming python with a CLI? as little GUI, perl, etc., as necessary. ubuntu has too much. maybe an editor. whatever is required to pip. ideally, also in a macos ARM virtual machine…

You can install Arch Linux without a GUI. Or you can customize it with as little of it as possible. That is if you want to be really as minimal as possible. Install and configure Neovim with plugins which will give you essentially an IDE-like environment, tmux for split windows and you are golden without any GUI.

a light-weight disttros you might try: Puppy Linux, Tiny Core Linux, ArchBang, AntiX.
You can also look at Bodhi Linux, MX Linux, Linux Lite, and maybe Manjaro XFCE

The common issue with distros that are considered “lightweight”, they all use really ugly themes and often are not as user friendly as alternatives.

The best course of action in my opinion is to install Arch and set it up with whatever lightweight things you want. This will give you the best system for yourself.
The easiest is to pick a small distro and install it, but deal with some inadequacies or reconfigure it later, which might cause some issues.

2 Likes

I haven’t tried it in a long while, but in the Linux Dark Ages you used to be able to set up your machine without a GUI. Is there no way to suppress X (or whatever) server startup and run just with a console login?

What is the goal here? You mentioned a macos VM–is the idea just to isolate your Python from the rest of the OS? Maybe using a container (Docker or something like that) would make more sense. Or just python or anaconda environments, really…

I guess I’m trying to understand the “as little OS as possible” goal–is this because of hardware requirements, or some desire for simplicity, or something else?

1 Like

I have used the Fedora minimal install to have just enough packages to boot up and then added only what I needed without unnecessary extras.

Fedora runs well in an apple silicon hosted VM.

Just because there is a GUI doesn’t mean you have to use it, if you don’t want to. I’m using Linux Mint with Cinnamon (i.e., downstream of Ubuntu with their most heavyweight WM option), and I can still just press ctrl-alt-F1 any time I want to get a full-screen terminal, maybe edit some code with command-line vi, etc.

If the goal is to specifically to have a minimal Linux installation e.g. for efficiency reasons on some ancient hardware (but really: I’m using this distro on a computer that’s almost 10 years old and was nothing special when I got it, and that’s still easily good enough to watch streaming 1080p video when my internet cooperates), you would be better off asking a Linux-specific forum than here. I’ve been using Python for close to 20 years and I can barely think of anything I could do in Python itself (i.e., not building C extensions) that would depend on the Linux distro; there are very few things that are even OS-specific (like interfaces to OS-exclusive functionality; the standard library does a good job of wrapping small differences when every OS has a different way to do something). If you know how to use a command line and how to write Python code, you’re set.

So no, there aren’t Linux distributions specifically geared towards programming Python, because that would be way too specific. Linux is supposed to be a general-purpose OS, and compete in the same space as Windows and MacOS. Honestly, I would expect that any OS “geared only towards programming Python with a CLI” would also be something that is only intended to run on a RaspberryPi.

As for Perl, I can’t even imagine how it’s relevant here. My machine came with Perl 5.30, but I can’t find any evidence of system scripts that depend on it - whereas there definitely are system-critical Python scripts.

This requires nothing beyond Python itself. The Python installation that comes with your distro might not include Pip, and you might have to get it using the system package manager - and of course, third-party packages that you install could potentially interfere with system-critical scripts. Better to make a virtual environment based off the system Python (it will bootstrap Pip automatically).

I can’t help with this, sorry. But I’m sure it causes very little additional complication.

1 Like

I also don’t understand why @iwelch wants to avoid perl. But I found that perl is a dependency for git on Debian and Arch (therefore, I assume, all derivative distros from those two). So it’s basically required for any kind of programming, python or not.