The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How install MySQLdb (python)

Discussion in 'Database Discussions' started by Timppa, Feb 25, 2016.

  1. Timppa

    Timppa Registered

    Joined:
    Feb 8, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page