python2.6+sles11.1+lxml3.0+spyne2.8.2安装

需要搭建webservice环境,决定使用spyne模块

1. 安装distribute-0.6.26.tar.gz

   最好安装上,否则有些软件安装会报错。
2. 安装lxml:
安装过程报错,原因为没有安装python-devel-2.6.0-8.9.20包,其次对“error: command 'gcc' failed with exit status 1”报错,还需要安装libxml2-dev和libxslt-dev包。
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fwrapv -fPIC -I/usr/include/libxml2 -I/root/lxml-3.0alpha2/src/lxml/includes -I/usr/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o
src/lxml/lxml.etree.c:4:20: error: Python.h: No such file or directory
src/lxml/lxml.etree.c:6:6: error: #error Python headers needed to compile C extensions, please install development version of Python.
error: command 'gcc' failed with exit status 1
3. 安装spyne2.8.2
安装报错:“error: Could not find suitable distribution for Requirement.parse('pytz')" ,原因为没有安装pytz模块,需要先安装该模块

Installed /usr/local/lib64/python2.6/site-packages/spyne-2.8.2_rc-py2.6.egg
Processing dependencies for spyne==2.8.2-rc
Searching for pytz
Reading http://pypi.python.org/simple/pytz/
Download error on http://pypi.python.org/simple/pytz/: [Errno -2] Name or service not known -- Some packages may not be found!
Reading http://pypi.python.org/simple/pytz/
Download error on http://pypi.python.org/simple/pytz/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'pytz' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error on http://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for pytz
error: Could not find suitable distribution for Requirement.parse('pytz')

 

总结: 为了安装spyne,需要先安装依赖模块,安装顺序为distribute,lxml,pytz,spyne


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值