Not strictly a django question, but it's something required to get
django running.

I am trying to get django 1.9 running in RHEL 6. I have installed
python2.7 and when I try to install MySQLdb, I get the errors shown
below. I have googled and googled and tried many different things, all
with no success. Can anyone please let me know how I can get this
going?

# /usr/local/bin/pip2.7 install MySQL-python
Collecting MySQL-python
  Downloading MySQL-python-1.2.5.zip (108kB)
    100% |████████████████████████████████| 110kB 3.2MB/s
Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python ... error
    Complete output from command /usr/local/bin/python2.7 -u -c
"import setuptools,
tokenize;__file__='/tmp/pip-build-SPMNQU/MySQL-python/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
'exec'))" install --record /tmp/pip-QrpP1S-record/install-record.txt
--single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
    creating build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/__init__.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CR.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/ER.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.linux-x86_64-2.7
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,'final',1)
-D__version__=1.2.5 -I/usr/include/mysql
-I/usr/local/include/python2.7 -c _mysql.c -o
build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc
-fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
    _mysql.c:44:23: error: my_config.h: No such file or directory
    _mysql.c:46:19: error: mysql.h: No such file or directory
    _mysql.c:47:26: error: mysqld_error.h: No such file or directory
    _mysql.c:48:20: error: errmsg.h: No such file or directory
    _mysql.c:88: error: expected specifier-qualifier-list before ‘MYSQL’
    _mysql.c:102: error: expected specifier-qualifier-list before ‘MYSQL_RES’
    _mysql.c: In function ‘_mysql_Exception’:
    _mysql.c:146: warning: implicit declaration of function ‘mysql_errno’
    _mysql.c:146: error: ‘_mysql_ConnectionObject’ has no member named
‘connection’
    _mysql.c:149: error: ‘CR_MAX_ERROR’ undeclared (first use in this function)
    _mysql.c:149: error: (Each undeclared identifier is reported only once
    _mysql.c:149: error: for each function it appears in.)
    _mysql.c:161: error: ‘CR_COMMANDS_OUT_OF_SYNC’ undeclared (first
use in this function)
    _mysql.c:162: error: ‘ER_DB_CREATE_EXISTS’ undeclared (first use
in this function)
    _mysql.c:163: error: ‘ER_SYNTAX_ERROR’ undeclared (first use in
this function)
    _mysql.c:164: error: ‘ER_PARSE_ERROR’ undeclared (first use in
this function)
    _mysql.c:165: error: ‘ER_NO_SUCH_TABLE’ undeclared (first use in
this function)
    _mysql.c:166: error: ‘ER_WRONG_DB_NAME’ undeclared (first use in
this function)
    _mysql.c:167: error: ‘ER_WRONG_TABLE_NAME’ undeclared (first use
in this function)
    _mysql.c:168: error: ‘ER_FIELD_SPECIFIED_TWICE’ undeclared (first
use in this function)
    _mysql.c:169: error: ‘ER_INVALID_GROUP_FUNC_USE’ undeclared (first
use in this function)
    _mysql.c:170: error: ‘ER_UNSUPPORTED_EXTENSION’ undeclared (first
use in this function)
    _mysql.c:171: error: ‘ER_TABLE_MUST_HAVE_COLUMNS’ undeclared
(first use in this function)
    _mysql.c:200: error: ‘ER_DUP_ENTRY’ undeclared (first use in this function)
    _mysql.c:246: warning: implicit declaration of function ‘mysql_error’
    _mysql.c:246: error: ‘_mysql_ConnectionObject’ has no member named
‘connection’
    _mysql.c: In function ‘_mysql_server_init’:
    _mysql.c:351: warning: label ‘finish’ defined but not used
    _mysql.c:268: warning: unused variable ‘item’
    _mysql.c:267: warning: unused variable ‘groupc’
    _mysql.c:267: warning: unused variable ‘i’
    _mysql.c:267: warning: unused variable ‘cmd_argc’
    _mysql.c:266: warning: unused variable ‘s’
    _mysql.c: In function ‘_mysql_ResultObject_Initialize’:
    _mysql.c:406: error: ‘MYSQL_RES’ undeclared (first use in this function)
    _mysql.c:406: error: ‘result’ undeclared (first use in this function)
    _mysql.c:411: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
    _mysql.c:411: error: ‘fields’ undeclared (first use in this function)
    _mysql.c:425: error: ‘_mysql_ResultObject’ has no member named ‘use’
    _mysql.c:428: warning: implicit declaration of function ‘mysql_use_result’
    _mysql.c:428: error: ‘_mysql_ConnectionObject’ has no member named
‘connection’
    _mysql.c:430: warning: implicit declaration of function ‘mysql_store_result’
    _mysql.c:430: error: ‘_mysql_ConnectionObject’ has no member named
‘connection’
    _mysql.c:431: error: ‘_mysql_ResultObject’ has no member named ‘result’
    _mysql.c:434: warning: implicit declaration of function ‘mysql_field_count’
    _mysql.c:434: error: ‘_mysql_ConnectionObject’ has no member named
‘connection’
    _mysql.c:438: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:442: warning: implicit declaration of function ‘mysql_num_fields’
    _mysql.c:443: error: ‘_mysql_ResultObject’ has no member named ‘nfields’
    _mysql.c:444: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:448: warning: implicit declaration of function ‘mysql_fetch_fields’
    _mysql.c:489: error: ‘BINARY_FLAG’ undeclared (first use in this function)
    _mysql.c:512: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c: In function ‘_mysql_ResultObject_traverse’:
    _mysql.c:526: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:527: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c: In function ‘_mysql_ResultObject_clear’:
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:539: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
    _mysql.c:551: error: ‘MYSQL’ undeclared (first use in this function)
    _mysql.c:551: error: ‘conn’ undeclared (first use in this function)
    _mysql.c:584: error: ‘_mysql_ConnectionObject’ has no member named
‘converter’
    _mysql.c:585: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
    _mysql.c:636: warning: implicit declaration of function ‘mysql_init’
    _mysql.c:636: error: ‘_mysql_ConnectionObject’ has no member named
‘connection’
    _mysql.c:639: warning: implicit declaration of function ‘mysql_options’
    _mysql.c:639: error: ‘_mysql_ConnectionObject’ has no member named
‘connection’
    _mysql.c:639: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first
use in this fun

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY5EXvaxNe%3D_wSp53DpznYCmRQM7-__rDLADzx_FEP4W4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to