Breaks Pillow webp support
See original GitHub issueInstalled Nuitka via pip3, Pillow via apt from debian repos.
$ nuitka3 --version
0.8.4
Commercial: None
Python: 3.10.5 (main, Jun 8 2022, 09:26:22) [GCC 11.3.0]
Flavor: Debian Python
Executable: /usr/bin/python3
OS: Linux
Arch: x86_64
Distribution: Debian sid
Pillow v9.1.1. My wish is to make Pillow code faster and produce single python-independent binary. AppImage is ok for me. Consider following example:
#!/usr/bin/env python3
from PIL import Image
def main():
Image.open("in.jpg").save("out.webp")
if __name__ == "__main__":
main()
Compiling with nuitka and executing:
$ CCFLAGS='-march=native' nuitka3 --quiet --onefile --follow-stdlib --follow-imports --remove-output --enable-plugin=numpy --enable-plugin=pyqt5 -j3 webp.py
produces binary webp.bin
$ ./webp.bin
Traceback (most recent call last):
File "/tmp/.mount_webp.bzy6UMM/webp.py", line 10, in <module>
main()
File "/tmp/.mount_webp.bzy6UMM/webp.py", line 7, in main
Image.open("in.jpg").save("out.webp")
File "/tmp/.mount_webp.bzy6UMM/PIL/Image.py", line 2280, in save
ValueError: unknown file extension: .webp
So no WebP support, unfortunate.
Replacing out.webp
with e.g. out.png
leads to working program, but I need WebP for my specific purpose.
UPD0:
Simplified command:
$ nuitka3 --onefile --full-compat --remove-output --enable-plugin=numpy --enable-plugin=pyqt5 webp.py
doesn’t work either.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
WEBP support not installed error with Pillow included in ...
Pillow has been tested with version 0.1.3, which does not read transparent WebP files. Versions 0.3.0 and above support transparency.
Read more >webp - PyPI
Python bindings for WebP. ... Python 3 (tested with v3.6); cffi; Pillow; numpy ... which breaks webp.load_images when the FPS is specified.
Read more >Unable to export WEBP, No module named 'PIL' - Inkscape
Summary: I'm unable to export my drawing into WEBP using "Export PNG image" ... Incompatible library version error on MacOS Big Sur (Pillow)....
Read more >src/_webp.c · squarecapadmin/Pillow - Gemfury
squarecapadmin / Pillow python ... message); break; case WEBP_MUX_BAD_DATA: case WEBP_MUX_NOT_ENOUGH_DATA: ... WebP Animation Support ...
Read more >26 WebP support - MComix Patches - SourceForge
Here is a a patch for WebP support. It requires Pillow rather than PIL. The WebP makes for archives that are generally a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Part of the of current pre-release, and will be part of 0.9 release.
Part of the 0.9 release that I just made.