Python 3.9 comes as a default with Fedora 34. However, sometimes you may wish to install older versions for development and test purposes. Apart from groupinstall
command, these instructions work for CentOS and REHL systems as well.
Install python development dependencies.
sudo dnf groupinstall "Development Tools"
sudo dnf install python3-devel openssl-devel zlib-devel bzip2-devel sqlite-devel libffi-devel
Note: You will need to rebuild and reinstall if you install new source or development libraries for python. Do not create or modify symlinks for python
, python3
, etc, as that may and will break many dependent libraries in your system.