2
[root@bigdata01 mysqlclient-python-master]# python3 setup.py install

/usr/local/python3/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
  warnings.warn(msg)
/usr/local/python3/lib/python3.5/site-packages/setuptools/dist.py:331: UserWarning: Normalizing '2.0.0dev1' to '2.0.0.dev1'
  normalized_version,
running install
running bdist_egg
running egg_info
writing mysqlclient.egg-info/PKG-INFO
writing dependency_links to mysqlclient.egg-info/dependency_links.txt
writing top-level names to mysqlclient.egg-info/top_level.txt
reading manifest file 'mysqlclient.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'mysqlclient.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.5/MySQLdb
running build_ext
building 'MySQLdb._mysql' extension
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(2,0,0,'dev',1) -D__version__=2.0.0dev1 -I/usr/include/mysql -I/usr/local/python3/include/python3.5m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.5/MySQLdb/_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 -DUNIV_LINUX -DUNIV_LINUX
MySQLdb/_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
MySQLdb/_mysql.c:533: error: ‘MYSQL_DEFAULT_AUTH’ undeclared (first use in this function)
MySQLdb/_mysql.c:533: error: (Each undeclared identifier is reported only once
MySQLdb/_mysql.c:533: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1

my OS is Centos6.7 and the default python version is 2.6 . so I install python3

[root@bigdata01 mysqlclient-python-master]# which python3
/usr/bin/python3

How could I solve this problem? Any answer will be appreciated , thanks very much!

0

1 Answer 1

1
pip3 install mysqlclient==1.4.4
Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

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.