Comments (8)
You'll need to install the latest libheif
from source before install pyheif.
from pyheif.
@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.
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.
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.
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.
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.
@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.
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)
- support for windows is missing HOT 3
- Version 0.5.2 missing arm and source HOT 2
- Commit history is blowed up HOT 12
- New release? HOT 3
- Can't install using pip HOT 2
- Missing _libheif_cffi module HOT 7
- Pip usage in documentation not ideal
- Looking forward to the "write" operation HOT 3
- Installing pyheif on Mac OS 12 failing no matter what HOT 2
- Where is pyheif's copyright? HOT 1
- Dependency on libffi should be updated to 1.10 HOT 1
- Python 3.11 wheel support HOT 5
- pip release, please HOT 2
- FFI error: struct heif_decoding_options: wrong total size HOT 11
- Pyheif Not Installing with pip command HOT 5
- Struct heif_decoding_options: wrong total size HOT 10
- pyheif doesn't install even after brew install libffi libheif HOT 13
- AttributeError: module '_libheif_cffi' has no attribute 'lib'
- Unable to package on Python 3.{10,11,12} with CFFI 1.16 on macOS 14.4 with Clang 15
- New release which works with current libheif HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyheif.