2011-06-11 46 views
2

我试图在Mac OSX雪豹安装LXML和不断收到错误:脂:想不通的体系结构类型:在/ var /文件夹/

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

我没有安装的XCode 10.4 SDK支持和我将gcc 4.2更改为4.0.1

任何线索??? Python的2.6.1与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 
+0

我们看不到您的错误信息。如果您在说(我)'不断收到此错误消息'时正在通用,那么您需要发布错误消息。也可以帮助发布您尝试安装的路径。祝你好运。 – shellter 2011-06-12 03:20:48

+0

@shelter我相信dev3928指的是标题中的文字作为错误信息。 – 2011-06-13 14:20:09

+0

请发布您运行的命令,整个错误消息,最好是整个构建输出。 '/ var/folders'是'$ TMPDIR'路径的开始,所以你甚至没有发布整行!此外,请提及您使用的是什么版本的Python以及哪个版本的OS X. – 2011-06-13 14:28:13

回答

0

您,是因为在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

+0

也是这样的:http://stackoverflow.com/questions/6839795/cant-figure-out-the-architecture-type-of-problem-when-compiling-python – 2017-01-31 17:19:01

0

我有同样的问题,而试图与Python 2.7安装牛奶。我无法用Ali Elouafiq的确切答案解决我的问题,但我能够使用Python 2.6系统安装牛奶。

因此,也许尝试其他版本的Python,直到它的工作是一种成本效益的方法。