[英]gcc-4.0 failed on mac 10.6.8 while installing Scrapy how can i overcome this?
I used pip install Scrapy on my mac 10.6.8 and i get the error below can anyone help me please? 我在我的mac 10.6.8上使用pip install Scrapy,我得到下面的错误,任何人都可以帮助我吗?
creating build/lib.macosx-10.3-fat-2.7/twisted/internet/iocpreactor/iocpsupport
copying twisted/internet/iocpreactor/iocpsupport/iocpsupport.c ->
build/lib.macosx-10.3-fat-2.7/twisted/internet/iocpreactor/iocpsupport
copying twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c ->
build/lib.macosx-10.3-fat-2.7/twisted/internet/iocpreactor/iocpsupport
copying twisted/python/_epoll.c ->
build/lib.macosx-10.3-fat-2.7/twisted/python
copying twisted/python/_initgroups.c ->
build/lib.macosx-10.3-fat-2.7/twisted/python
copying twisted/runner/portmap.c ->
build/lib.macosx-10.3-fat-2.7/twisted/runner
copying twisted/test/raiser.c ->
build/lib.macosx-10.3-fat-2.7/twisted/test
running build_ext
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
/usr/libexec/gcc/powerpc-apple-darwin10/4.0.1/as: assembler
(/usr/bin/../libexec/gcc/darwin/ppc/as or
/usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not
installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
lipo: can't open input file:
/var/folders/jk/jkTyAFDWEC8fvZts+C7Jwk+++TI/-Tmp-//ccBIdB4l.out (No
such file or directory)
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/folders/jk/jkTyAFDWEC8fvZts+C7Jwk+++TI/-Tmp-//cceIymsT.out
building 'twisted.test.raiser' extension
creating build/temp.macosx-10.3-fat-2.7
creating build/temp.macosx-10.3-fat-2.7/twisted
creating build/temp.macosx-10.3-fat-2.7/twisted/test
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
In file included from /usr/include/architecture/i386/math.h:626,
from /usr/include/math.h:28,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyport.h:312,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:58,
from twisted/test/raiser.c:4:
/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building
for Intel with Mac OS X Deployment Target < 10.4 is invalid.
/usr/libexec/gcc/powerpc-apple-darwin10/4.0.1/as: assembler
(/usr/bin/../libexec/gcc/darwin/ppc/as or
/usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not
installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
lipo: can't open input file:
/var/folders/jk/jkTyAFDWEC8fvZts+C7Jwk+++TI/-Tmp-//ccNvrcyZ.out (No
such file or directory)
error: command 'gcc-4.0' failed with exit status 1
---------------------------------------- Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;__file__='/Users/bbb/Dropbox/projects/android/continuous-integration/build/Twisted/setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --single-version-externally-managed
--record /var/folders/jk/jkTyAFDWEC8fvZts+C7Jwk+++TI/-Tmp-/pip-MXEZuX-record/install-record.txt
failed with error code 1 Storing complete log in
/Users/bbb/.pip/pip.log
It appears you have installed Xcode 4 which removed the gcc-4.0
used to build the Python 2.7 you have installed. 您似乎已经安装了Xcode 4,它删除了用于构建已安装的Python 2.7的gcc-4.0
。 From the path names in the traceback, chances are that was a 32-bit-only Python downloaded from python.org. 从traceback中的路径名,很可能是从python.org下载的32位Python。 With Xcode 4, you should try installing the latest 64-bit/32-bit OS X installer for Python 2.7 from python.org instead. 使用Xcode 4,您应该尝试从python.org安装最新的用于Python 2.7的64位/ 32位OS X安装程序 。 You will then likely need to re-install any packages you had installed, like Distribute
, pip
, and dependencies. 然后,您可能需要重新安装已安装的任何软件包,例如Distribute
, pip
和dependencies。 Depending on which version of Xcode 4, you may also need to supply the following environment variable setting before running pip
or easy_install
: 根据哪个版本的Xcode 4,您可能还需要在运行pip
或easy_install
之前提供以下环境变量设置:
export CC=gcc
pip installs python packages. pip安装python包。 Ofthen Those python packages depend on c libaries which should be installed by your package manager and which are not installed by pip. Ofthen那些python包依赖于c libaries,它们应该由你的包管理器安装,而不是由pip安装。
Looking at the output your missing a couple of header files of packages. 查看输出中缺少的几个包头文件。 I could spot these there could be more.. 我可以发现这些可能会有更多......
conftest.c:1:23: error: sys/epoll.h: No such file or directory
include/python2.7/pyport.h:312
on ubuntu it is a simple look in the package manager for the: python-dev
and epoll-dev
packages. 在ubuntu上,它是包管理器中的简单外观: python-dev
和epoll-dev
包。 but there is probably an easy way for osx to. 但是osx可能有一个简单的方法。
OR you can look for a precompiled package for your osx. 或者,您可以为您的osx寻找预编译的包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.