0

I am trying to install an epub to sword python conversion utility from: https://github.com/AndBible/sword_studybibles

pip install -r requirements.txt

errors with:

Compile failed: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInittv37cbvn.c -o tmp/xmlXPathInittv37cbvn.o
      cc tmp/xmlXPathInittv37cbvn.o -lxml2 -o a.out
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> lxml

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I had to comment out the line markupsafe==1.0 in the requirements.txt file because it would error out, but then the file indicates that it is installed via jinja2==2.10 anyway, which it is, so I don't think that is an issue.

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --output-file requirements.txt requirements.in
#
beautifulsoup4==4.6.0
jinja2==2.10
lxml==4.2.1
#markupsafe==1.0           # via jinja2
ipdb

All of the other modules installed fine, but the install errors out while Building wheel for xmlx (setup.py)

I have been trying many suggestions for installing possibly missing packages and deps, for the same error: error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 with no success.

If someone can help figure out what could be missing or is the issue, or if I can provide more details to help, I would sure appreciate it.

  • I would recommend installing lxml with apt-get instead of pip. Those packages have all been precompiled for us, no need to redo it! See https://stackoverflow.com/a/6504860/3216427 – joanis Jan 21 '23 at 02:51
  • thnks for the reply. `pip list` returns that `lxml 4.8.0` is installed. – naphelge Jan 21 '23 at 06:30
  • The package maintainers locked the dependency versions here, but it may well be that those dependencies are not that specify, and that lxml 4.8.0 will work too. I'd give it a shot with that version. It might not work since the authors probably did not test with 4.8.0, but try just changing the version in the requirements file and see if things work out. – joanis Jan 21 '23 at 13:22

0 Answers0