在雪豹上安装mysqldb [英] Install mysqldb on snow leopard
问题描述
谢谢
我建议安装macports(最新的svn trunk)并从中安装mysql。
sudo端口安装mysql5-server
下载MySQL-python-1.2.2源代码
确保/ opt / local / lib / mysql5 / bin位于您的路径或编辑site.cfg以包括:
mysql_config = / opt / local / lib / mysql5 / bin / mysql_config
注释掉_mysql.c的第38行
// #define uint unsigned int
然后运行:
sudo python setup .py安装
应该是好的。
I am trying to get started on working with Python on Django I am by profession a PHP developer and have been told to set up django and python on my current apache and mysql setup however I am having trouble getting the Mysqldb module for python to work, I must of followed about 6 different set of instructions, I am running snow leopard and have mysql installed natively it is not part of MAMP or similar. Please can some tell me where I need to start and what steps I need to follew I would be most grateful.
Thanks
I'd recomend installing macports (latest svn trunk) and installing mysql from there.
sudo port install mysql5-server
Download the MySQL-python-1.2.2 source
make sure /opt/local/lib/mysql5/bin is in your path or edit site.cfg to include:
mysql_config = /opt/local/lib/mysql5/bin/mysql_config
Comment out line 38 of _mysql.c
// #define uint unsigned int
Then run:
sudo python setup.py install
should be all good.
这篇关于在雪豹上安装mysqldb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!