- 积分
- 117977
- 威望
-
- 金钱
-
- 注册时间
- 2009-4-24
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
- root@vpser:~# cd MySQL-python-1.2.3
- root@vpser:~/MySQL-python-1.2.3# python setup.py install
- sh: mysql_config: not found
- Traceback (most recent call last):
- File "setup.py", line 15, in <module>
- metadata, options = get_config()
- File "/root/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
- libs = mysql_config("libs_r")
- File "/root/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
- raise EnvironmentError("%s not found" % (mysql_config.path,))
- EnvironmentError: mysql_config not found
复制代码
首先查找mysql_config的位置,使用find / -name mysql_config ,比如我的在/usr/local/mysql/bin/mysql_config
修改setup_posix.py文件,在26行:
mysql_config.path = "mysql_config" 修改为:
mysql_config.path = "/usr/local/mysql/bin/mysql_config"
修改完成后保存,再执行
python setup.py build
python setup.py install
安装完成 |
|