Need to install python2 in Rocky9

If you really need Python 2 and don’t mind building it from sources here’s the instructions:

dnf -y groupinstall "development tools"

# Latest Python 2.x version
curl -L -O https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz

tar xf Python-2.7.18.tar.xz

cd Python-2.7.18

./configure --prefix=/usr/local --enable-shared --enable-unicode=ucs4

make && make altinstall

# Also add this line to .bash_profile or something
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/bin/python2.7:$LD_LIBRARY_PATH