Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

raspberry pi unable to install lxml pip package

I am trying to install lxml package after i installed BeautifulSoup4 package.

In the terminal i type:

sudo pip install lxml

This is what i get

sudo pip install lxml
Downloading/unpacking lxml
  Running setup.py egg_info for package lxml
    Building lxml version 3.6.1.
    Building without Cython.
    Using build configuration of libxslt 1.1.26
    Building against libxml2/libxslt in the following directory: /usr/lib

Installing collected packages: lxml
  Running setup.py install for lxml
    Building lxml version 3.6.1.
    Building without Cython.
    Using build configuration of libxslt 1.1.26
    Building against libxml2/libxslt in the following directory: /usr/lib
    building 'lxml.etree' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-armv9l-2.7/src/lxml/lxml.etree.o -w

And then it just hangs there at the last line for a very long long time, I have to exit by pressing CTRL+C.

Can someone tell me what it really means?

I then try pip freeze to see if the package is installed. No, it is not there.

like image 933
sam Avatar asked Dec 18 '22 14:12

sam


1 Answers

well you could open python and try importing it. But if its python 3 try this

sudo apt-get install python3-lxml

else its

sudo apt-get install python-lxml
like image 149
thesonyman101 Avatar answered Dec 21 '22 05:12

thesonyman101