安装mysqldb时出错

发布于 2024-10-18 08:30:18 字数 736 浏览 1 评论 0原文

在 mac osx 10.5 上安装 mysqldb 时:

sudo ../bin/python /Users/Awais/mysqlpython/setup.py install

我收到以下错误:

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'

When installing mysqldb on mac osx 10.5:

sudo ../bin/python /Users/Awais/mysqlpython/setup.py install

I get the following error:

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'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沐歌 2024-10-25 08:30:18

看起来你正在为Python安装MySQL,但你必须先安装MySQL。因此,首先从 http://dev.mysql.com/downloads/mysql/ 并安装它,然后尝试安装 MySQL for Python。

It seems that you are installing MySQL for Python but you have to have MySQL installed first. So, first download the MySQL installer from http://dev.mysql.com/downloads/mysql/ and install it and then try installing MySQL for Python.

一人独醉 2024-10-25 08:30:18

我正在尝试将较旧的 Linux 服务器 RH EL 5 工作站移植到 CentOS 6.4 64 位。我必须做的两件事之一——因为我已经有一段时间没有构建基于 Python 的 MySQL 服务器了——是确保安装了 mysql-devel,并且从菜单软件安装,以及MySQL-python 已安装。

以这种方式安装 MySQL-python 的优点是 CentOS 6.4 发行版与 MySQL-python-1.2.3-0.3.c1.1.el6.x86_64 匹配安装的 MySQL 版本 5.1.69。

在此之前,我尝试构建和安装 MySQL-python 但没有成功。在一个完美的世界里,我会找出原因,但是,就像很多事情一样,我已经到了最后期限,而且这很有效,并且在我在 SO 和其他地方读到的帖子中也得到了推荐。

I am trying port an older Linux server RH EL 5 Workstation to CentOS 6.4 64-bit. One of the two things I have had to do -- because it had been a while since I had built a Python-based MySQL server -- was make sure mysql-devel was installed, and from the menu-software install, as well as MySQL-python was installed.

The advantage to installing MySQL-python this way that the CentOS 6.4 distribution matches MySQL-python-1.2.3-0.3.c1.1.el6.x86_64 matches the version of MySQL installed 5.1.69.

Prior to this, I tried building and installing MySQL-python with no success. In a perfect world, I would figure out why, but, like many things, I am on a deadline, and this worked, and was also recommended in posts I read both on SO and elsewhere.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文