How install MySQLdb (python)

Timppa

Registered
Feb 8, 2016
2
0
51
Finland
cPanel Access Level
Root Administrator
I have a fresh install cPanel server and when I try to import MySQLdb in python:

>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named MySQLdb

I get an error message: ImportError: No module named MySQLdb

Then I try:
# yum install MySQL-python

But did not succeed. How can i install MySQLdb Python module?

Best Regards, Timppa
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

That package is unsupported, but you can search for and use a custom repository to install it via YUM, or install the package from source:

MySQL for Python

Thank you.