Mac下安装MySQLdb

由于重装过MySQL,开始port uninstall mysql5的时候相依赖的MySQLdb也要uninstall,所以需要重新装一下MySQLdb -- Python interface to mysql。
ericdemacbook:~ Eric$ sudo port install py26-mysql
---> Fetching py26-mysql
---> Verifying checksum(s) for py26-mysql
---> Extracting py26-mysql
---> Applying patches to py26-mysql
---> Configuring py26-mysql
---> Building py26-mysql
---> Staging py26-mysql into destroot
---> Installing py26-mysql @1.2.2_0+mysql5
---> Activating py26-mysql @1.2.2_0+mysql5
---> Cleaning py26-mysql
ericdemacbook:~ Eric$ python
Python 2.6.2 (r262:71600, Jul 25 2009, 17:16:37)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
>>> #上面是MySQLdb在Python2.6下的小bug吧
>>> print MySQLdb.version_info
(1, 2, 2, 'final', 0)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值