python - 脂肪 : can't figure out the architecture ty

我尝试在 Mac OSX Snowleopard 上安装 lxml 并不断收到错误消息:

lipo: can't figure out the architecture type of: /var/folders/

我确实安装了支持 10.4 SDK 的 XCode,并将 gcc 4.2 更改为 4.0.1

有线索吗??? Python 2.6.1 与 Leopard 1.6.7..

running install
running bdist_egg
running egg_info
writing src/lxml.egg-info/PKG-INFO
writing top-level names to src/lxml.egg-info/top_level.txt
writing dependency_links to src/lxml.egg-info/dependency_links.txt
reading manifest file 'src/lxml.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'lxml.etree.c' under directory 'src/lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src/lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src/lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src/lxml'
warning: no files found matching '*.html' under directory 'doc'
writing manifest file 'src/lxml.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-universal/egg
running install_lib
running build_py
running build_ext
building 'lxml.etree' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/usr/include/libxml2 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-universal-2.6/src/lxml/lxml.etree.o -w -flat_namespace
i686-apple-darwin10-gcc-4.2.1: src/lxml/lxml.etree.c: No such file or directory
i686-apple-darwin10-gcc-4.2.1: no input files
powerpc-apple-darwin10-gcc-4.2.1: src/lxml/lxml.etree.c: No such file or directory
powerpc-apple-darwin10-gcc-4.2.1: no input files
i686-apple-darwin10-gcc-4.2.1: src/lxml/lxml.etree.c: No such file or directory
i686-apple-darwin10-gcc-4.2.1: no input files
lipo: can't figure out the architecture type of: /var/tmp//ccCwMxyq.out
error: command 'gcc-4.2' failed with exit status 1

最佳答案

您的 python 存在架构问题,由于 Xcode 4 发生了变化(放弃了对 10.4u SDK 和 gcc-4.0 的支持),因此在 10.7 Lion 上使用该 Python 构建 C 扩展模块是不切实际的。要么使用 Apple 提供的 Python 2.7

/usr/bin/python2.7

安装 Python 2.7.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer

关于python - 脂肪 : can't figure out the architecture type of:/var/folders/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6316583/

相关文章:

svn - 对于 SVN/Tortoisesvn,如何只显示文件夹属性的日志,即不显示文件夹的内容?

.net - 在 .NET 中存储加密/解密 key

python - 如何使用 tripit API 制作独立工具?

winforms - 更新 ClickOnce 应用程序

facebook - 如何在 Facebook 上为我的应用程序上传没有黑色颗粒状边框的图标?

visual-studio-2010 - 在 Visual Studio 中自动终止 "Stop D

php - PHP 中的静态类是不好的做法吗?

sql - 死锁:插入与从多个表中选择。快照隔离?

makefile - 规范 'simple project' 生成文件

asp.net - 如何从使用 URL 路由的 ASP.NET 站点上的 URL 中删除参数?