【问题标题】:Error when installing Twisted using PIP使用 PIP 安装 Twisted 时出错
【发布时间】:2012-04-02 00:37:56
【问题描述】:

4.11,我正在尝试使用 pip 或 easy_install 安装 Scrapy。

两者都失败了,首先它失败说我没有可用的 gcc-4.0,然后我使用我的安装 cd 安装它。现在它弹出其他错误。

为 Twisted 运行 setup.py install,一开始我收到以下错误

gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c conftest.c -o conftest.o
conftest.c:1:21: error: rpc/rpc.h: No such file or directory
conftest.c:1:21: error: rpc/rpc.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccXYV9xx.out
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c conftest.c -o conftest.o
conftest.c:1:23: error: sys/epoll.h: No such file or directory
conftest.c:1:23: error: sys/epoll.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//cctYFimU.out
building 'twisted.test.raiser' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c twisted/test/raiser.c -o build/temp.macosx-10.3-fat-2.7/twisted/test/raiser.o

并以:

结尾

lipo: 无法确定架构类型:/var/tmp//ccYXFDmd.out 错误:命令“gcc-4.0”失败,退出状态为 1

我对这一切都很陌生,任何解决这个问题的帮助都会很棒!

【问题讨论】:

    标签: twisted pip scrapy easy-install


    【解决方案1】:

    你在 OS X 上吗?

    试试这个:

    sudo env ARCHFLAGS="-arch i386 -arch x86_64" pip install scrapy

    相关:trying to install lxml on max osx leopard

    【讨论】:

    • 它仍然给我错误。我在 Mac 10.4.11 上,收到的错误如下: raiser.c -o build/temp.macosx-10.3-intel-2.7/twisted/test/raiser.o gcc-4.0: Unable to guess config name for arch x86_64 为什么要构建 10.3-intel?!
    • 我不是 10.4 方面的专家,但猜测它是 32 位发行版尝试:sudo env ARCHFLAGS="-arch i386" pip install scrapy
    猜你喜欢
    • 2015-10-08
    • 2021-01-23
    • 2019-06-14
    • 2017-12-22
    • 2021-03-06
    • 2013-01-26
    • 2016-06-04
    • 2015-05-23
    相关资源
    最近更新 更多