2

I'm trying to install pyheif to use heic files on Linux server.

pyheif: https://pypi.org/project/pyheif/

Linux library command:

sudo apt-get install python3 python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python3-pip

sudo apt-get install libpcap-dev libpq-dev

apt install libffi6 libheif-dev libde265-dev  <-- I cannot find libffi. only libffi6 is available.

Now then I try to install pyheif

pip3 install pyheif

TRACEBACK:

...long lines ...
    build/temp.linux-x86_64-3.6/_libheif_cffi.c: In function ‘_cffi_d_heif_context_read_from_memory_without_copy’:
    build/temp.linux-x86_64-3.6/_libheif_cffi.c:2375:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pfesa6xd/pyheif/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-me_rlsh8-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-pfesa6xd/pyheif/

How can I install pyheif?

How can I solve that tracebacks.

touchingtwist
  • 1,930
  • 4
  • 23
  • 38

1 Answers1

1

https://github.com/carsales/pyheif/issues/44

We can install from wheel anyway. The problem why wheel was not used was matching the tags (manylinux), in particular pip was missing the cp36-cp36m-manylinux2014_x86_64 (had only cp36-cp36m-manylinux2010_x86_64). This was due to an older version of pip (19.2), rather than 19.3.

pip install -U pip
pip install pyheif
varun
  • 194
  • 1
  • 7