GithubHelp home page GithubHelp logo

Comments (8)

 avatar commented on August 30, 2024

You'll need to install the latest libheif from source before install pyheif.

from pyheif.

paddywwoof avatar paddywwoof commented on August 30, 2024

@david-poirier-csn thanks. I interpreted "latest libheif from source" as download v1.8 source from github and

sudo apt install autotools-dev
sudo apt install automake
sudo apt install libtool
./autogen.sh
./configure
make
sudo make install

(most of which had to be discovered by trial and error/google) Now I can pip3 install pyheif --user (and I also downloaded the repo from here and sudo python3 setup.py install) but I get

>>> import pyheif
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/pyheif/pyheif/__init__.py", line 3, in <module>
    import _libheif_cffi
ImportError: /home/pi/.local/lib/python3.7/site-packages/_libheif_cffi.abi3.so: undefined symbol: heif_image_handle_get_raw_color_profile
>>> 

Is there some other header I need to install?

from pyheif.

 avatar commented on August 30, 2024

If you download the release you should be able to skip ./autogen.sh and most of the dependencies - it's only supposed to be necessary when building from clone instead of release.

Try running ./configure --prefix /usr instead of ./configure - this will put the files in the right place when you run make install

Don't forget that libheif relies on libde265 to decode, and you may need to build this from source as well if the latest libheif needs it. See how you go.

from pyheif.

paddywwoof avatar paddywwoof commented on August 30, 2024

David, thanks for your help here. I've now tried all those suggestions (compiling libheif is quite long winded on the Raspberry Pi, libde265 even longer!) but still get the same undefined symbol in _libheif_cffi.abi3.so when I try to import pyheif.

Oh well. Maybe I should just tell people they will have to convert their iPhone images to jpeg if they want to display them on the Raspberry Pi. Sooner or later the functionality will be added to PIL

from pyheif.

 avatar commented on August 30, 2024

Sure, no worries. I might try building an armv6 or armv7 wheel as I just found out this is possible! This would basically solve all installation issues on ARM.

from pyheif.

paddywwoof avatar paddywwoof commented on August 30, 2024

That would be great. Also, looking at issues on the python-pillow site I see that the main (only) contender is pyheif!
PS don't know if you can deduce anything from piwheels' attempts to build a wheel for Raspberry Pi

from pyheif.

paddywwoof avatar paddywwoof commented on August 30, 2024

@david-poirier-csn did building the armv6 or armv7 wheel work? If so, do you have any instructions that could help people with this issue?
Paddy

from pyheif.

paddywwoof avatar paddywwoof commented on August 30, 2024

David, for the sake of completion. This has now been fixed pi3d/pi3d_demos#24 (comment) Thanks again for the module.

Paddy

from pyheif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.