Mac下用ports安装的python-mysql驱动回报告出错: /opt/…

Mac下用ports安装的python-mysql驱动回报告出错:

/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

刚才李明同学说实际上可以忽略他们,在出错的那一行前面加上:

import warnings
 35 warnings.simplefilter("ignore", DeprecationWarning)

而后就OK了。