Get the App
SLTechnology News&Howtos  ›  Database  › 

How to solve the error report of centos7 installation MySQLdb-python

Shulou Source: shulou.com Published: 2022-05-31 18:09:24 11月16日 Update

How to solve centos7 installation MySQLdb-python error, I believe many inexperienced people are helpless about this, for this reason this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.

Run pip install MySQL-Python Error: Cloud Virtual Machine

Command python setup.py egg_info failed with error code 1 in

continue to test

yum install mysql-devel systemctl restart mariadb

Then install the error:

Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-GMXMYA/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('', '');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-VMNV_c-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-GMXMYA/MySQL-python/

Continue to find installation

yum install MySQL-python systemctl restart mariadb

Testing for successful installation

python

Execution after entering Python

>>> import MySQLdb>>> print dir(MySQLdb)['BINARY', 'Binary', 'Connect', 'Connection', 'DATE', 'DATETIME', 'DBAPISet', 'DataError', 'DatabaseError', 'Date', 'DateFromTicks', 'Error', 'FIELD_TYPE', 'IntegrityError', 'InterfaceError', 'InternalError', 'MySQLError', 'NULL', 'NUMBER', 'NotSupportedError', 'OperationalError', 'ProgrammingError', 'ROWID', 'STRING', 'TIME', 'TIMESTAMP', 'Time', 'TimeFromTicks', 'Timestamp', 'TimestampFromTicks', 'Warning', '__all__', '__author__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__revision__', '__version__', '_mysql', 'apilevel', 'connect', 'connection', 'constants', 'debug', 'escape', 'escape_dict', 'escape_sequence', 'escape_string', 'get_client_info', 'paramstyle', 'release', 'result', 'server_end', 'server_init', 'string_literal', 'test_DBAPISet_set_equality', 'test_DBAPISet_set_equality_membership', 'test_DBAPISet_set_inequality', 'test_DBAPISet_set_inequality_membership', 'thread_safe', 'threadsafety', 'times', 'version_info']

yum install MySQLdb-python instead of pip install MySQLdb-python Author:

After reading the above content, do you know how to solve centos7 installation MySQLdb-python error method? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Tags: Content methods more problems success helplessness for this reason skills servers articles systems experience industry information information channels channels services testing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB vpn MySQL Linux macOS