ModuleNotFoundError: No module named 'mysql' in Python 3.10.0 (default, Nov 6 2021, 14:56:25) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux

The CentOS 7 openssl11 package is currently not supported. It places files in non-standard locations and uses the non-standard names for pkg-config modules (e.g. openssl11.pc).

Update

You could patch the configure script and force it to use openssl11 module:

sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
yum install -y epel
yum install -y yum-utils make openssl11-devel
yum-builddep -y python3
1 Like