Bry*_*ock 66 python mysql easy-install
这是我试过的:
$ easy_install-2.6 -d /home/user/lib/python2.6 MySQLdb
Searching for MySQLdb
Reading http://pypi.python.org/simple/MySQLdb/
Couldn't find index page for 'MySQLdb' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for MySQLdb
error: Could not find suitable distribution for Requirement.parse('MySQLdb')
Run Code Online (Sandbox Code Playgroud)
ber*_*nie 143
您的包名称错误.
MySQL-python是正确的:
easy_install MySQL-python
要么
pip install MySQL-python
小智 8
Adam是对的,但在运行之前,easy_install MySQL-python您需要确保python-dev已安装,因为默认情况下未安装.
安装是apt-get install python-dev.