Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on Raspberry Pi 3 fails #13

Open
JoergZ2 opened this issue Mar 22, 2021 · 2 comments
Open

Installation on Raspberry Pi 3 fails #13

JoergZ2 opened this issue Mar 22, 2021 · 2 comments

Comments

@JoergZ2
Copy link

JoergZ2 commented Mar 22, 2021

Can't install requirments on a Raspberry Pi Model 3 (Buster, actual). This are the errors from pip install:

    ERROR: Command errored out with exit status 1:
     command: /home/pi/mycroft-core/.venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-__djb5k7/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-__djb5k7/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-__djb5k7/lxml/pip-egg-info
         cwd: /tmp/pip-install-__djb5k7/lxml/
    Complete output (3 lines):
    Building lxml version 4.6.2.
    Building without Cython.
    Error: Please make sure the libxml2 and libxslt development packages are installed.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Neither manual installation of libxml2 and libxslt with pip didn't work nor by sudo apt install... After upgrading pip there where some steps futher. Sems that Python or system tries to compile needed libraries. But then it calls for arm-linux-gnueabihf-gcc. This package doesn't exist. Any hints for me?

@pedrinho
Copy link
Owner

According to https://ofstack.com/python/20751/pythonpip-installation-lxml-error-problem-resolution.html running this solved:

sudo apt-get install python-dev libxml2-dev libxslt1-dev zlib1g-dev

@JoergZ2
Copy link
Author

JoergZ2 commented Mar 22, 2021

Got again error message:

    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/home/pi/mycroft-core/.venv/include -I/usr/include/python3.7m -c src/lxml/etree.c -o build/temp.linux-armv7l-3.7/src/lxml/etree.o -w
    arm-linux-gnueabihf-gcc: fatal error: Killed signal terminated program cc1
    compilation terminated.
    Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
    cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitza7xouci.c -o tmp/xmlXPathInitza7xouci.o
    /tmp/xmlXPathInitza7xouci.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
     main (int argc, char **argv) {
     ^~~~
    cc tmp/xmlXPathInitza7xouci.o -lxml2 -o a.out
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/pi/mycroft-core/.venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pj1dk2_9/lxml_553d855c66e04212ac9c767203dc8991/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pj1dk2_9/lxml_553d855c66e04212ac9c767203dc8991/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i__jdbwd/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/mycroft-core/.venv/include/site/python3.7/lxml Check the logs for full command output.

Where are the logs that are mentioned in last line? The main problem seems to be missing 'arm-linux-gnueabihf-gcc'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants