Need help installing MySQL for Python

孤者浪人 提交于 2019-12-12 01:17:53

问题


Trying to install MySQL for Python. Two problems:

1) Instructions over the net says installation is

python setup.py
For me, it results with
can't open file 'setup.py': [Errno 2] No such file or directory

2) README.txt says:

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
Which simply leads to the package itself, not anything else.

Thanks for your help.

PS. I'm using a Mac + Leopard.


回答1:


You are confusing A Zope product (ZMySQLDA) with the python-mysqldb package. Try one of the download files, if it doesn't help, go for the source. Note that the source trunk is clearly divided into ZMySQLDA/ and MySQLdb/ .




回答2:


If you're using a Debian based distro you can :

apt-get install python-mysqldb ( or aptitude if you prefer ).



来源:https://stackoverflow.com/questions/1458500/need-help-installing-mysql-for-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!