开发者

can't import MySQLdb

开发者 https://www.devze.com 2023-03-26 02:43 出处:网络
Hi I ran the following scripts from macports and still can\'t run the import MySQLdb. Any idea what the problem could be?开发者_JAVA百科

Hi I ran the following scripts from macports and still can't run the import MySQLdb. Any idea what the problem could be?

开发者_JAVA百科
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消