Hi I ran the following scripts from macports and still can't run the import MySQLdb. Any idea what the problem could be?
sudo port install py26-mysql
sudo port install mysql5-server
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named MySQLdb
>>>
Most likely you are not using Macports Python, but OSX native Python installation, or wrong version of Python from Macports.
Make sure you launch Python interpreter 2.6 from Macports.
加载中,请稍侯......
精彩评论