Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Buster issue: "Can't roll back Pillow; was not uninstalled" #259

Closed
sapnho opened this issue Apr 8, 2022 · 19 comments
Closed

New Buster issue: "Can't roll back Pillow; was not uninstalled" #259

sapnho opened this issue Apr 8, 2022 · 19 comments

Comments

@sapnho
Copy link

sapnho commented Apr 8, 2022

I got two comments this last week that apparently there has been an OS Buster update on April 4 which messes up things:

...and I'm stuck at sudo pip3 install picframe
I get:
Can't roll back Pillow; was not uninstalled
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-w5vo6_9a/Pillow/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-record-ng8l3s4c/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-w5vo6_9a/Pillow/

And if I then reboot and do picframe -i .
I get this:
-bash: picframe: command not found

This is with OS Buster, latest release on a Pi3. Did anything change with Pillow?

@sapnho
Copy link
Author

sapnho commented Apr 8, 2022

Ok, just did a fresh install on a Pi4 myself.
The install process breaks down after the downloading of Pi3D 2.49. This is the message:

Building wheels for collected packages: Pillow
Running setup.py bdist_wheel for Pillow ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-r887zlou/Pillow/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-jhg9zvzx --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageSequence.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageShow.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PyAccess.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_binary.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImagePath.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageColor.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageDraw.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BdfFontFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageMorph.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/WalImageFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageFont.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/Image.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PaletteFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PcfFontFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageTransform.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ContainerIO.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ExifTags.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TiffTags.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PdfParser.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FitsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageQt.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/main.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_util.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageMath.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImagePalette.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TarIO.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageEnhance.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GdImageFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageFilter.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_version.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/init.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FontFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/features.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageWin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PSDraw.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageGrab.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageMode.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageStat.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageCms.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageTk.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageChops.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/JpegPresets.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageOps.py -> build/lib.linux-armv7l-3.7/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing requirements to src/Pillow.egg-info/requires.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.c'
warning: no files found matching '
.h'
warning: no files found matching '.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.clang-format'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git
' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

Traceback (most recent call last):
File "/tmp/pip-install-r887zlou/Pillow/setup.py", line 996, in
zip_safe=not (debug_build() or PLATFORM_MINGW),
File "/usr/lib/python3/dist-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 188, in run
self.run_command('build')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/tmp/pip-install-r887zlou/Pillow/setup.py", line 804, in build_extensions
raise RequiredDependencyException(f)
main.RequiredDependencyException: jpeg

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-r887zlou/Pillow/setup.py", line 1009, in
raise RequiredDependencyException(msg)
main.RequiredDependencyException:

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html


Failed building wheel for Pillow
Running setup.py clean for Pillow
Failed to build Pillow
Installing collected packages: ExifRead, IPTCInfo3, Pillow, ninepatch, PyYAML, paho-mqtt, pi3d, picframe
Found existing installation: Pillow 5.4.1
Not uninstalling pillow at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'Pillow'. No files were found to uninstall.
Running setup.py install for Pillow ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-r887zlou/Pillow/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-record-xmy2e1z0/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageSequence.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageShow.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PyAccess.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_binary.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImagePath.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageColor.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageDraw.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BdfFontFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageMorph.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/WalImageFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageFont.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/Image.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PaletteFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PcfFontFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageTransform.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ContainerIO.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ExifTags.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TiffTags.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PdfParser.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FitsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageQt.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/main.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_util.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageMath.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImagePalette.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TarIO.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageEnhance.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GdImageFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageFilter.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/_version.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/init.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FontFile.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/features.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageWin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PSDraw.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageGrab.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageMode.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageStat.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageCms.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageTk.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageChops.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/JpegPresets.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-3.7/PIL
copying src/PIL/ImageOps.py -> build/lib.linux-armv7l-3.7/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing requirements to src/Pillow.egg-info/requires.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.c'
warning: no files found matching '
.h'
warning: no files found matching '.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.clang-format'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git
' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
   https://pillow.readthedocs.io/en/latest/installation.html

Traceback (most recent call last):
  File "/tmp/pip-install-r887zlou/Pillow/setup.py", line 996, in <module>
    zip_safe=not (debug_build() or PLATFORM_MINGW),
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.7/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 78, in run
    _build_ext.run(self)
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/tmp/pip-install-r887zlou/Pillow/setup.py", line 804, in build_extensions
    raise RequiredDependencyException(f)
__main__.RequiredDependencyException: jpeg

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-r887zlou/Pillow/setup.py", line 1009, in <module>
    raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
   https://pillow.readthedocs.io/en/latest/installation.html



----------------------------------------

Can't roll back Pillow; was not uninstalled
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-r887zlou/Pillow/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-record-xmy2e1z0/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-r887zlou/Pillow/
`

@helgeerbe
Copy link
Owner

Try this:

apt-get install libjpeg-dev zlib1g-dev
and then

pip3 install Pillow

Does this work?

@sapnho
Copy link
Author

sapnho commented Apr 8, 2022

I had to add sudo for the first command.

pi@pi3test:~ $ apt-get install libjpeg-dev zlib1g-dev
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
pi@pi3test:~ $ sudo apt-get install libjpeg-dev zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
zlib1g-dev is already the newest version (1:1.2.11.dfsg-1+deb10u1).
zlib1g-dev set to manually installed.
The following NEW packages will be installed:
libjpeg-dev libjpeg62-turbo-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 239 kB of archives.
After this operation, 546 kB of additional disk space will be used.
Get:1 http://mirror.de.leaseweb.net/raspbian/raspbian buster/main armhf libjpeg62-turbo-dev armhf 1:1.5.2-2+deb10u1 [181 kB]
Get:2 http://mirror.de.leaseweb.net/raspbian/raspbian buster/main armhf libjpeg-dev all 1:1.5.2-2+deb10u1 [57.7 kB]
Fetched 239 kB in 1s (289 kB/s)
Selecting previously unselected package libjpeg62-turbo-dev:armhf.
(Reading database ... 99929 files and directories currently installed.)
Preparing to unpack .../libjpeg62-turbo-dev_1%3a1.5.2-2+deb10u1_armhf.deb ...
Unpacking libjpeg62-turbo-dev:armhf (1:1.5.2-2+deb10u1) ...
Selecting previously unselected package libjpeg-dev.
Preparing to unpack .../libjpeg-dev_1%3a1.5.2-2+deb10u1_all.deb ...
Unpacking libjpeg-dev (1:1.5.2-2+deb10u1) ...
Setting up libjpeg62-turbo-dev:armhf (1:1.5.2-2+deb10u1) ...
Setting up libjpeg-dev (1:1.5.2-2+deb10u1) ...
pi@pi3test:~ $ pip3 install Pillow
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (5.4.1)

@sapnho
Copy link
Author

sapnho commented Apr 8, 2022

Can we update the sudo pip3 install picframe script to account for this?

@helgeerbe
Copy link
Owner

Does it work now?

@sapnho
Copy link
Author

sapnho commented Apr 8, 2022

Yes.

@helgeerbe
Copy link
Owner

This seems more a Pillow problem. I'm using 9.0.1 and everything was fine. 1st of April 9.1.0 was released. Guess there is nothing we can do on our side.

As a workaround one could run pip install Pillow==9.0.1 before installing picframe

@paddywwoof
Copy link
Collaborator

paddywwoof commented Apr 8, 2022

Or change the line in setup.py from Pillow>=9.0.0 to Pillow==9.0.1. Until the pillow devs fix it! Using dependencies >= might not be as safe as using == then waiting for one of use to test with a later version, I'm including myself in this with the pi3d>=2.49 I might put a bug in the next release!

That was basically the error I got the other day (2nd of Apr!!) which I referred to as a complaint about a missing jpeg header for pillow As I said, I assumed it was because I had missed out or mistyped one of @thomasedoff console inputs.

To patch over it I just used apt install python3-pillow (also more correctly known as python3-pil I think the version in bullseye is 8.1.2). Presumably we can't include a command to apt install a header file in the setup.py file but we could add it to the manual installation requirements, or using @thomasedoff instructions add it to here.

@sapnho
Copy link
Author

sapnho commented Apr 8, 2022

It would be nice to include it in the setup.py file so that installation is as easy as before. Could we do that or would it have other consequences?

@thomas4f
Copy link

thomas4f commented Apr 8, 2022

Hello,

I am not a seasoned Python user, but I don't think that Pillow is broken, so there should be no need to "hardcode" the version.

As I understand it, pip will check for- and download precompiled binaries from piwheels.org if available. Otherwise pip will compile the necessary binaries locally, which requires "some" (I don't know exactly which) additional header files.

Without these headers, pip will throw errors.

Currently, there is a notice over at piwheels.org stating that "piwheels does not currently support aarch64". So the headers are required for all Model 4 owners running a 64-bit OS.

Assuming that sapho is running a 64-bit OS and has not installed the headers, this would explain the issue.

@paddywwoof, the issue you got the other day - regardless of 64- or 32-bit - was most likely because of piwheels.org being offline for several hours that day. I made a small note of it here:

# Note, looks like piwheels.org was down for a few hours today, contributing the the build failures pointed out above. A temporary workaround was to install missing dependencies via APT instead. Normally this should not be necessary!
# sudo apt-get install -y --no-install-recommends python3-pillow

As I see, you have the following options:

  • Run 32-bit OS
  • Install the necessary headers manually
  • Wait for piwheels.org to support aarch64, and
  • ... to add pillow 9.1.0 (see below)

@paddywwoof
Copy link
Collaborator

Looks like there is this python-pillow/Pillow#5797 (comment) issue with v9.1.0 so we might have to force setup to use v9.0.1 until we clear up both issues.

@thomas4f
Copy link

thomas4f commented Apr 8, 2022

Actually, looking closer at piwheels.org there does not seem to be a precompiled package of Pillow 9.1.0 for any platform.

So if you're trying to install 9.1.0 at this point in time, you will need the headers, regardless of the architecture.

@paddywwoof
Copy link
Collaborator

paddywwoof commented Apr 8, 2022

@thomasedoff you are probably right about the piwheels being offline, and also about the aarch64 support, but I think I got the same multi-page error text about missing headers when I tried to setup bullseye with piOS32, which I did before testing the 64 bit, and I'm sure the headers didn't need to be installed previously. Of course they might have been a requirement of some other package that is no longer there in the latest piOS lite setup!

EDIT - maybe we just need to give the wheel building robot a chance to catch up. I seem to remember it's running on several Raspberry Pi computers rather than attempting to cross compile, so probably takes quite a while to get through a back-log of compilation. But we need to see what the pillow devs say about the possible memory leak regression.

@helgeerbe
Copy link
Owner

Issue could be solved now. I just checked pinwheels.org and there are precompiled packages for Pillow 9.1.0 now available.

@paddywwoof I installed Pillow 9.1.0. yesterday manually and I can't confirm that our old memory issue popped up again. Seems to be a different issue. My system logs look fine.

@thomas4f
Copy link

thomas4f commented Apr 11, 2022

Now that a precompiled Pillow 9.1.0 is available, my system (bullseye 32-bit) also appear to be free of immediate issues.

pi@picframe:~ $ pip install Pillow --upgrade --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: Pillow in ./.local/lib/python3.9/site-packages (9.0.1)
Collecting Pillow
  Downloading https://www.piwheels.org/simple/pillow/Pillow-9.1.0-cp39-cp39-linux_armv7l.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 501 kB/s 
Installing collected packages: Pillow
  Attempting uninstall: Pillow
    Found existing installation: Pillow 9.0.1
    Uninstalling Pillow-9.0.1:
      Successfully uninstalled Pillow-9.0.1
Successfully installed Pillow-9.1.0
pi@picframe:~ $ systemctl --user restart picframe
pi@picframe:~ $ systemctl --user status picframe
● picframe.service - PictureFrame
     Loaded: loaded (/home/pi/.config/systemd/user/picframe.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-04-11 15:02:05 CEST; 10s ago
   Main PID: 22184 (xinit)
      Tasks: 5 (limit: 1170)
        CPU: 7.145s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/picframe.service
             ├─22184 xinit /usr/bin/python3 /home/pi/.local/bin/picframe /home/pi/picframe_data/config/configuration.yaml
             ├─22185 /usr/lib/xorg/Xorg :0
             └─22192 /usr/bin/python3 /home/pi/.local/bin/picframe /home/pi/picframe_data/config/configuration.yaml

Apr 11 15:02:05 picframe xinit[22185]:         to make sure that you have the latest version.
Apr 11 15:02:05 picframe xinit[22185]: Markers: (--) probed, (**) from config file, (==) default setting,
Apr 11 15:02:05 picframe xinit[22185]:         (++) from command line, (!!) notice, (II) informational,
Apr 11 15:02:05 picframe xinit[22185]:         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Apr 11 15:02:05 picframe xinit[22185]: (==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr 11 15:02:05 2022
Apr 11 15:02:05 picframe xinit[22185]: (==) Using config directory: "/etc/X11/xorg.conf.d"
Apr 11 15:02:05 picframe xinit[22185]: (==) Using system config directory "/usr/share/X11/xorg.conf.d"
Apr 11 15:02:06 picframe xinit[22185]: (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
Apr 11 15:02:12 picframe xinit[22192]: INFO:start.py:starting ['/home/pi/.local/bin/picframe', '/home/pi/picframe_data/config/configuration.yaml']
Apr 11 15:02:12 picframe xinit[22192]: INFO:model.Model:Open config file: /home/pi/picframe_data/config/configuration.yaml

@helgeerbe
Copy link
Owner

So we can close this issue now?

@sapnho
Copy link
Author

sapnho commented Apr 11, 2022

Let me do a fresh install later today so that I can confirm that it works.

@sapnho
Copy link
Author

sapnho commented Apr 11, 2022

Just did a fresh install. It works!

Strange message but it works.

Collecting Pillow>=9.0.0 (from picframe) Downloading https://www.piwheels.org/simple/pillow/Pillow-9.1.0-cp37-cp37m-linux_armv7l.whl (806kB) 100% |████████████████████████████████| 808kB 410kB/s Collecting ExifRead (from picframe) Downloading https://files.pythonhosted.org/packages/91/c6/177a40fefa6e9ed1a10f0f98863a7137b0a89c4eae5609b9737926dba85f/ExifRead-2.3.2-py3-none-any.whl Installing collected packages: Pillow, pi3d, PyYAML, ninepatch, IPTCInfo3, paho-mqtt, ExifRead, picframe Found existing installation: Pillow 5.4.1 Not uninstalling pillow at /usr/lib/python3/dist-packages, outside environment /usr Can't uninstall 'Pillow'. No files were found to uninstall. Successfully installed ExifRead-2.3.2 IPTCInfo3-2.1.4 Pillow-9.1.0 PyYAML-6.0 ninepatch-0.1.20 paho-mqtt-1.6.1 pi3d-2.49 picframe-2022.3.24

@helgeerbe
Copy link
Owner

I close this, because this was a Pillow issue (already solved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants