Installing mysql-python on Centos

前端 未结 5 1603
逝去的感伤
逝去的感伤 2020-12-03 01:45

I\'m trying to get the MySQL-python lib installed on centos 5.5. I ran

sudo yum install MySQL-python

but then when I tried:



        
5条回答
  •  猫巷女王i
    2020-12-03 02:10

    I have Python 2.7.5, MySQL 5.6 and CentOS 7.1.1503.

    For me it worked with the following command:

    # pip install mysql-python
    

    Note pre-requisites here:

    Install Python pip:

    # rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
    
    # yum -y update
    Reboot the machine (if kernel is also updated)
    
    # yum -y install python-pip
    

    Install Python devel packages:

    # yum install python-devel
    

    Install MySQL devel packages:

    # yum install mysql-devel
    

提交回复
热议问题