Update CyberPanel Error: ERROR: Failed building wheel for mysqlclient

I’m trying to update my cyberpanel but I’m not getting it because I get the following error: ERROR: Failed building wheel for mysqlclient. The update is canceled and I have to restart my server to get back to normal.

My CyberPanel Version:
1.9
Build
2


Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /usr/local/CyberPanel/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-d96_cm17/mysqlclient/setup.py’"’"’; file=’"’"’/tmp/pip-install-d96_cm17/mysqlclient/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r
‘"’"’, ‘"’"’
‘"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-6qa5nk14
cwd: /tmp/pip-install-d96_cm17/mysqlclient/
Complete output (30 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/init.py → build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/exceptions.py → build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py → build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py → build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py → build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py → build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/release.py → build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/times.py → build/lib.linux-x86_64-3.6/MySQLdb
creating build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/init.py → build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py → build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py → build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py → build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py → build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py → build/lib.linux-x86_64-3.6/MySQLdb/constants
running build_ext
building 'MySQLdb.mysql’ extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/MySQLdb
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,4,6,‘final’,0) -D__version
=1.4.6 -I/usr/include/mysql -I/usr/include/mysql/mysql -I/usr/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o
gcc -pthread -shared -Wl,-z,relro -g build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o -L/usr/lib64/ -L/usr/lib64 -lmariadb -lpython3.6m -o build/lib.linux-x86_64-3.6/MySQLdb/_mysql.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lmariadb
collect2: error: ld returned 1 exit status
error: command ‘gcc’ failed with exit status 1

ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: six, pycparser, cffi, cryptography, pyOpenSSL, setuptools, josepy, pbr, mock, pytz, pyRFC3339, idna, chardet, certifi, urllib3, requests, acme, asgiref, asn1crypto, Babel, backports.ssl-match-hostname, bcrypt, python-dateutil, jmespath, docutils, botocore, s3transfer, boto3, ConfigArgParse, zope.interface, configobj, future, parsedatetime, zope.event, zope.component, certbot, decorator, sqlparse, Django, websocket-client, docker-pycreds, docker, enum34, funcsigs, ipaddress, IPy, MarkupSafe, Jinja2, jsonpointer, jsonpatch, mysqlclient, PyNaCl, paramiko, ptyprocess, pexpect, prettytable, psutil, py3dns, pygpgme, pyudev, pyxattr, PyYAML, requests-file, SimpleWebSocketServer, tldextract
CERROR: Operation cancelled by user

same problem

This didn’t help me “pip3 install mysqlclient==1.4.6”, I got the same error.
For me the solution was “yum install MariaDB-shared”

Hi just
sudo yum install python3-devel

yum install MariaDB-shared worked for me as well, thank you George