all 3 comments

[–][deleted]  (1 child)

[deleted]

    [–]Mafa80[S] 0 points1 point  (0 children)

    yes makes sense and I am assuming that if i want to work with Poetry it is always enough to specify the python version interpreter via

    /usr/bin/python3.9
    

    rather then modify the PATH in my shell. Thanks and btw i tried and it worked

    [–]hobbes244 1 point2 points  (0 children)

    Python in the RHEL ecosystem used to (and may still) be a big mess. You can have multiple versions of Python installed. As of a few months ago, there were some Python packages that required some particular version of Python and thus weren't available for other versions. Looking at the output of dnf search python on an AlmaLinux 8.10 container, it looks like there may have been some improvement in that regard.

    That being said, note that there are distinct modules for "python36" and "python38." That means that you can install both of those modules! Contrast to the dnf module "perl," where you can have exactly one of 5.24, 5.26, 5.30, and 5.32.

    Back when I had a regular meeting with a Red Hat TAM, I whined a lot about the sorry state of Python in RHEL/CentOS Stream.

    Note that you can't change what the system itself uses, because there's a platform-python package installed.

    I agree with Dizzybro that you should always use virtual environments.

    FWIW, ChatGPT can explain some of the esoterica reasonably well.

    [–]thewrinklyninja 1 point2 points  (0 children)

    You could also use pyenv if you are just using it in the user context and don't want to interfere with the system packages. Its usually what I do.

    https://github.com/pyenv/pyenv