Mac下安装MySQLdb

xiaoxiao2022-06-11  27

由于重装过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-mysqlericdemacbook:~ Eric$ python Python 2.6.2 (r262:71600, Jul 25 2009, 17:16:37) [GCC 4.0.1 (Apple Inc. build 5465)] on darwinType "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)
转载请注明原文地址: https://www.6miu.com/read-4931821.html

最新回复(0)