尝试安装MySQL for Python。两个问题:
1)网上的说明说安装是
python setup.py对我来说,结果是
can't open file 'setup.py': [Errno 2] No such file or directory
2)README.txt说:
The Z MySQL database adapter uses the MySQLdb package.这只是导致包装本身,而不是其他任何东西。
This must be installed before you can use the Z MySQL DA. You can find this at: http://sourceforge.net/projects/mysql-python
感谢您的帮助。
PS。我正在使用Mac + Leopard。
答案 0 :(得分:2)
您将Zope product
(ZMySQLDA
)与python-mysqldb包混淆了。
尝试其中一个download files,如果没有帮助,请转到source。
请注意,源干线明确分为ZMySQLDA/
和MySQLdb/
。
答案 1 :(得分:1)
如果你使用的是基于Debian的发行版,你可以:
apt-get install python-mysqldb
(如果您愿意,可以选择资质)。