gpt4 book ai didi

python - 安装mysqldb时出错

转载 作者:行者123 更新时间:2023-11-28 19:27:51 24 4
gpt4 key购买 nike

在 mac osx 10.5 上安装 mysqldb 时:

sudo ../bin/python/Users/Awais/mysqlpython/setup.py 安装

我收到以下错误:

Traceback (most recent call last):
File "/Users/Awais/mysqlpython/setup.py", line 15, in <module>
metadata, options = get_config()
File "/Users/Awais/mysqlpython/setup_posix.py", line 32, in get_config
metadata, options = get_metadata_and_options()
File "/Users/Awais/mysqlpython/setup_common.py", line 7, in get_metadata_and_options metadata = dict(config.items('metadata'))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ConfigParser.py", line 564, in items
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'metadata'

最佳答案

看来您正在为 Python 安装 MySQL,但您必须先安装 MySQL。所以,首先从 http://dev.mysql.com/downloads/mysql/ 下载 MySQL 安装程序。并安装它,然后尝试为 Python 安装 MySQL。

关于python - 安装mysqldb时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5053980/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com