I know that this is a corner case but in CentOS 6.10 (still supported till the end of this year or even longer with extended support) python is below 2.7 which means that site.getsitepackages() will not work:
>>> import site
>>> site.getsitepackages()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'getsitepackages'
I know that this is a corner case but in CentOS 6.10 (still supported till the end of this year or even longer with extended support) python is below 2.7 which means that
site.getsitepackages()
will not work: