我想使用的easy_install(画中画),但收到错误消息像安装LXML和pycrypto模块
Running lxml-2.3.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kGsWMh/lxml-2.3.4/egg-dist-tmp-Gjqy3f
Building lxml version 2.3.4.
Building without Cython.
Using build configuration of libxslt 1.1.24
In file included from /usr/include/limits.h:63,
from /Developer/usr/bin/../lib/gcc/powerpc-apple-darwin10/4.0.1/include/limits.h:10,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:19,
from src/lxml/lxml.etree.c:4:
/usr/include/sys/cdefs.h:540:4: error: #error Unknown architecture
In file included from /usr/include/limits.h:64,
from /Developer/usr/bin/../lib/gcc/powerpc-apple-darwin10/4.0.1/include/limits.h:10,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:19,
from src/lxml/lxml.etree.c:4:
/usr/include/machine/limits.h:10:2: error: #error architecture not supported
In file included from /usr/include/sys/_types.h:33,
from /usr/include/_types.h:27,
from /usr/include/stdio.h:67,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:33,
from src/lxml/lxml.etree.c:4:
/usr/include/machine/_types.h:36:2: error: #error architecture not supported
In file included from /usr/include/_types.h:27,
from /usr/include/stdio.h:67,
from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:33,
from src/lxml/lxml.etree.c:4:
/usr/include/sys/_types.h:94: error: syntax error before ‘__darwin_blkcnt_t’
src/lxml/lxml.etree.c:165640: error: syntax error before ‘val’
src/lxml/lxml.etree.c:165645: error: syntax error before ‘val’
喇嘛喇嘛。 。 。
src/lxml/lxml.etree.c:165645: error: syntax error before ‘val’
lipo: can't figure out the architecture type of: /var/folders/f3/2q2x2p015kzgd4nbrn_qwykh0000gn/T//cc1pnrww.out
error: command 'gcc-4.0' failed with exit status 1
我得到类似的语法错误,当我尝试安装pycrypto为好。 我想这个答案 ,但徒劳无功。 我试着设置了为Python 2.6,并使用setuptools的-0.6c11-py2.6.egg和setuptools的-0.6c11-py2.7.egg 2.7环境,但得到相同的输出。
我搜索了很多网上,但无法找到这个解决方案。
编辑:我在OSX 10.7上的MacBook Pro 2010和XCode的4和3安装有
我倒是ARGS与最新版本取代,而试图在上面的链接的命令。
python setup.py build --static-deps --libxml2-version=2.7.8 --libxslt-version=1.1.26
sudo python setup.py install
我读了一些其它岗位,并试图以此为好
STATIC_DEPS=true sudo easy_install --allow-hosts=lxml.de,*.python.org lxml
解:
作为@jdi建议我做了以下
$ brew install --use-llvm libxml2
$ brew install --use-llvm libxslt
安装了gcc的链接 ,因为我仍在为选择1和2面临的问题建议
然后,用户可以在本
$ export ARCHFLAGS="-arch i386 -arch x86_64"
$ /usr/bin/python2.6 setup.py build
$ sudo /usr/bin/python2.6 setup.py install
或者这一点,将工作
$ sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install-2.6 lxml
同样就职于pycrypto以及