【问题标题】:python setuptools and easy_install numpy questionpython setuptools 和 easy_install numpy 问题
【发布时间】:2011-10-01 05:24:30
【问题描述】:

所以我在这里有点进退两难。 setuptools 不使用 easy_install 来获取您在 setup.py 中指定的其他依赖项吗?我问是因为说我有一个 setup.yp 并且在 install_requires = ["numpy"] 中。现在,如果我运行 python setup.py install 会出现错误:

_configtest.c:1:20: error: Python.h: No such file or directory
_configtest.c:1:20: error: Python.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//cciDxELX.out
_configtest.c:1:20: error: Python.h: No such file or directory
_configtest.c:1:20: error: Python.h: No such file or directory

但是,如果我运行“easy_install numpy”就可以了。什么可能导致这种行为?

问候, 波格丹

【问题讨论】:

    标签: python numpy setuptools


    【解决方案1】:

    您收到的错误类型通常是因为您没有安装 Python 开发包。如果您使用的是基于 Ubuntu 的发行版,请转到 Synaptic,然后搜索 python-dev(名称可能不是 100% 准确,请在那里浏览一下)。

    可能是 easy_install 可以使用预构建的东西。

    【讨论】:

    • 我在 MacOS 上。问题是它仅在 setup.py 中列为 install_requires 时才会出现这些错误。如果我只是从命令行去easy_install numpy,错误就消失了。
    猜你喜欢
    • 2012-01-28
    • 2014-12-29
    • 1970-01-01
    • 1970-01-01
    • 2014-03-11
    • 2013-02-07
    • 2010-12-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多