"Pip MySQL-python 설치"의 두 판 사이의 차이

6번째 줄: 6번째 줄:
[root@jmnote ~]# pip show MySQL-python
[root@jmnote ~]# pip show MySQL-python
[root@jmnote ~]# pip list | grep MySQL-python
[root@jmnote ~]# pip list | grep MySQL-python
[root@jmnote ~]# python -c "import MySQLdb"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named MySQLdb
You have new mail in /var/spool/mail/root
</source>
</source>



2014년 7월 21일 (월) 13:42 판

Python MySQLdb 모듈 설치
MySQL-python 설치

1 확인

[root@jmnote ~]# pip show MySQL-python
[root@jmnote ~]# pip list | grep MySQL-python
[root@jmnote ~]# python -c "import MySQLdb"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named MySQLdb
You have new mail in /var/spool/mail/root

2 방법

[root@jmnote ~]# pip install MySQL-python
Downloading/unpacking MySQL-python
  Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
  Running setup.py egg_info for package MySQL-python
Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python
    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,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.6 -c _mysql.c -o build/temp.linux-x86_64-2.6/_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
    In file included from /usr/include/mysql/my_config.h:14,
                     from _mysql.c:44:
    /usr/include/mysql/my_config_x86_64.h:1082:1: warning: "HAVE_WCSCOLL" redefined
    In file included from /usr/include/python2.6/pyconfig.h:6,
                     from /usr/include/python2.6/Python.h:8,
                     from _mysql.c:29:
    /usr/include/python2.6/pyconfig-64.h:808:1: warning: this is the location of the previous definition
    gcc -pthread -shared build/temp.linux-x86_64-2.6/_mysql.o -L/usr/lib64/mysql -L/usr/lib64 -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lssl -lcrypto -lpython2.6 -o build/lib.linux-x86_64-2.6/_mysql.so
Successfully installed MySQL-python
Cleaning up...

3 확인 2

[root@jmnote ~]# pip list | grep MySQL-python
MySQL-python (1.2.5)
[root@jmnote ~]# pip show MySQL-python
---
Name: MySQL-python
Version: 1.2.5
Location: /usr/lib64/python2.6/site-packages
Requires:

4 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}