pymemcompat.h:10:20: error: Python.h
O/S : Centos 6.x / 64bit
작업 : python 에서 mysql 사용하려면 모듈 추가 진행해야 한다
MySQL-python
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@localhost MySQL-python-1.2.3]# python2 setup.py build running build running build_py copying MySQLdb/release.py -> build/lib.linux-x86_64-2.6/MySQLdb running build_ext building '_mysql' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include/mysql -I/usr/include/python2.6 -c _mysql.c -o build/temp.linux-x86_64-2.6/_mysql.o In file included from _mysql.c:29: pymemcompat.h:10:20: error: Python.h: 그런 파일이나 디렉터리가 없습니다 _mysql.c:30:26: error: structmember.h: 그런 파일이나 디렉터리가 없습니다 [root@localhost MySQL-python-1.2.3]# python setup.py build |
1 2 3 |
[root@localhost MySQL-python-1.2.3]# yum install python-devel [root@localhost MySQL-python-1.2.3]# python setup.py install |
파이썬 모듈 설치 작업