Replace python 3.6 with 3.9 in rocky 8.9


We are using rocky 8.9 but it comes with python 3.6 - which is being flagged vulnerable. I found information on installing python 3.9 but that doesn’t replace or remove 3.6. Any input on how to uninstall 3.6 and install 3.9 is much appreciated.


You cannot replace python 3.6 (provided by platform-python) with any other python version. This will break your system and it is recommended that you do not attempt to do this.

You can verify if vulnerabilities are addressed using rpm -q platform-python --changelog | less. If you cannot find the appropriate CVE, you can try to find it here and see if it has been addressed, it hasn’t been, and reasoning behind why/why not.

Likewise, Python 2.7 is flagged dead, yet RHEL 7 still has it?

No. Those “flagged” programs are upstream Pythons. Rocky does not have upstream Python.

Rocky has RHEL version of Python. The RHEL versions do have security backports by Red Hat.

Python 3.11 is installed in Rocky 8.9

[root@gerry-rocky8 ~]# python3 -V
Python 3.6.8
[root@gerry-rocky8 ~]# python3.11 -V
Python 3.11.5
[root@gerry-rocky8 ~]# alternatives --list
python3 auto /usr/bin/python3.6
python auto /usr/libexec/no-python

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.