How to install lxml on Amazon EC2 for Python 3.4 -


after got lxml installed on computer downloading .whl file http://www.lfd.uci.edu/~gohlke/pythonlibs/, thought lxml installation problems behind me. but, wrong. not seem easier on ec2 platform. have tried every command can think of—sudo pip3/pip3.4/pip-3.4/easy_install-3.4 lxml/lxml-3.5.0-cp34-none-win32.whl/lxml-3.5.0-cp34-none-win32.whl, static_deps=true sudo pip3/pip3.4/pip-3.4/easyinstall-3.4 install lxml. keep getting could not find function xmlcheckversion in library libxml2. libxml2 installed? error message. have tried install these libraries too, far not successfully. installing either lxml or dependent libraries appreciated.

i able install libxml2 executing following procedure:

download tar.gz. file http://www.linuxfromscratch.org/blfs/view/7.7/general/libxml2.html, transfer ec2 instance, , run tar -zxvf libxml2-2.9.2.tar.gz directory in file located. run sudo yum install libxml2-devel libxslt-devel python34-devel. (the reason why unable install these packages @ first used omnipresent “-dev” wording, did not work in particular setup.) libxml2-2.9.2 folder (as per instructions @ http://www.linuxfromscratch.org/blfs/view/7.7/general/libxml2.html) run

    sed \   -e /xmlinitializecatalog/d \   -e 's/((ent->checked =.*&&/(((ent->checked == 0) ||\           ((ent->children == null) \&\& (ctxt->options \& xml_parse_noent))) \&\&/' \   -i parser.c 

,

./configure --prefix=/usr --disable-static --with-history --with-python=/usr/bin/python3 && make 

, and

make install 

then . . . , when ran sudo easy_install-3.4 lxml, guess . . . ; yes, instance ran out of memory. so, had apply following fix how add swap ec2 instance?:

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1m count=1024 sudo /sbin/mkswap /var/swap.1 sudo /sbin/swapon /var/swap.1 

after that, took quite while install using sudo easy_install-3.4 lxml, worked.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -