Mac下装个MySQL环境真麻烦啊。
系统是OS X 10.7,MySQL 5.5.25a,Python 2.7.3,Xcode 4.3.3
我就为了装个Python的MySQL驱动,难道非得要再装个几百兆的GCC么...求助啊...
输出内容贴在下面
Reals-MacBook-Pro:~ real$ pip install mysql-python
Downloading/unpacking mysql-python
Downloading MySQL-python-1.2.3.tar.gz (70Kb): 70Kb downloaded
Running setup.py egg_info for package mysql-python
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
Installing collected packages: mysql-python
Running setup.py install for mysql-python
gcc-4.2 not found, using clang instead
building '_mysql' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
In file included from _mysql.c:36:
/usr/local/mysql/include/my_config.h:329:11: warning: 'SIZEOF_SIZE_T' macro redefined
#define SIZEOF_SIZE_T SIZEOF_LONG
^
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:43:17: note: previous definition is here
# define SIZEOF_SIZE_T 8
^
In file included from _mysql.c:36:
/usr/local/mysql/include/my_config.h:422:9: warning: 'HAVE_WCSCOLL' macro redefined
#define HAVE_WCSCOLL
^
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:890:9: note: previous definition is here
#define HAVE_WCSCOLL 1
^
_mysql.c:1421:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (how < 0 || how >= sizeof(row_converters)) {
~~~ ^ ~
3 warnings generated.
clang -bundle -undefined dynamic_lookup -g build/temp.macosx-10.6-intel-2.7/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lpthread -o build/lib.macosx-10.6-intel-2.7/_mysql.so -arch x86_64
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
Successfully installed mysql-python
Cleaning up...
--转自