error: Setup script exited with error: command 'gcc' failed with exit status 1

前端 未结 3 568
感情败类
感情败类 2020-12-15 05:38

I get the following error when I try to install MySQL-python-1.2.3 under Python 2.6 in Fedora 14.

Fedora 14 comes with Python 2.7 by default and I am working in a p

相关标签:
3条回答
  • 2020-12-15 06:23

    you need to install MySQL Development package

    yum install mysql-devel
    
    0 讨论(0)
  • 2020-12-15 06:30

    Solved this issue in the following way

    1. Copy MySQLdb folder from site-packages directory of Python2.7 to Python2.6.
    2. Also copy the following files from site-packages directory of Python2.7 to Python2.6.

      _mysql.so

      _mysql_exceptions.py

      _mysql_exceptions.pyc

      _mysql_exceptions.pyo

    Now try the following

    >>> import MySQLdb  
    >>> MySQLdb.__version__  
    '1.2.3'
    
    0 讨论(0)
  • 2020-12-15 06:41

    Install python-devel. That should help

    0 讨论(0)
提交回复
热议问题