There is no denying it, python is one of the most popular programming languages. And although I hate the syntax until the day I die (come at me, but indentation as syntax is a mistake), the shier number of packages, tools, libraries, APIs, yada, yada, makes it extremely flexible and versatile.
Quote
A jack of all trades is a master of none, but often times better than a master of one.
Or as I call it in German
Quote
Die Eierlegende Wollmilchsau
Info
Install as a system package
Fedora
Info
Should already be installed by default
sudo dnf install python
System Packages vs. pip
Installing packages globally through pip
isn’t the most optimal thing, especially when using it in a development environment.
It is generally preferred to install the specific package through the official repositories or AUR, where the package name often follows the python-<package_name>
scheme.
Install in an environment
Another way is to utilize virtual environments.
I, personally, prefer using miniforge, which provides the conda
and mamba
commands, among others.
conda
is too bloated for meanaconda
uses the Anaconda Inc. channel
I prefer the community supported conda-forge
channel, though, which miniforge uses by default and exclusively. Furthermore, miniforge is installed in user space, so it marks a clear separation of a virtual environment to the system installation.
- Download the latest installer script from the download page, or using
bash
wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
- Run the script through
bash
bash Miniforge3.sh
- Choose no when prompted whether you want to update your shell configuration or not (doesn’t work for all shells).
- Add miniforge’s
bin
directory to your$PATH
- Close and reopen your shell
conda init
, if your shell supports itrm Miniforge3.sh
the installation script
Now when you wish to activate an environment, you can simply use
conda activate env_name