4

I have installed Python2.7,virtualenv and pip2.7 in centos6.4 64bit as python2.6 is a default one.

when i try to install mysqldb using

pip2.7 install MySQL-python

error occurs and python-devel package is already installed.

_mysql.c:2551: error: '_mysql_ConnectionObject' has no member named 'open'
_mysql.c:2558: error: '_mysql_ConnectionObject' has no member named 'converter'
_mysql.c:2565: error: '_mysql_ConnectionObject' has no member named 'connection'
_mysql.c:2572: error: '_mysql_ConnectionObject' has no member named 'connection'
_mysql.c:2579: error: '_mysql_ConnectionObject' has no member named 'connection'
_mysql.c:2642: error: '_mysql_ResultObject' has no member named 'converter'
_mysql.c:2642: error: initializer element is not constant
_mysql.c:2642: error: (near initialization for '_mysql_ResultObject_memberlist[0].offset')
_mysql.c: In function '_mysql_ConnectionObject_getattr':
_mysql.c:2666: error: '_mysql_ConnectionObject' has no member named 'open'
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/MySQL-python/setup.py';exec(compile(getattr(tokenize,

'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-eNCiSQ-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/MySQL-python Storing debug log for failure in /root/.pip/pip.log

asked Apr 25, 2014 at 12:07
1
  • If you're still looking for a solution to this problem, you may have better luck on another StackExchange site, superuser.com. Commented Dec 22, 2014 at 22:14

1 Answer 1

3

It looks like you don't have the mysql-devel package installed, which is required so that the uncompiled source and header files are available to the MySQL-python package.

As root, run

yum install mysql-devel

and try again!

answered Feb 26, 2016 at 16:25
Sign up to request clarification or add additional context in comments.

1 Comment

I was having the same issue and this was just what I needed! Thanks!!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.