-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix setup.py on debian #2853
Fix setup.py on debian #2853
Conversation
Do we care about <= Precise? Trusty is the oldest LTS supported. https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions |
For some reason, I thought it was good till next year, even after migrating off of it. It's still in the docker builds, but we could drop that, as we've likely got library coverage for old libraries on the centos build. |
b8733a7
to
3d4045e
Compare
Ok, I've removed debian from the tests, and force rebased this one on top of that. |
Wiredfool, You commented, there's got to be a better way ... But at least you have left enough tracks to help me. I have the same problem as bochecha: I believe your fix includes 2851. Thank you and Peace, |
You can test this out with: git clone https://github.com/wiredfool/Pillow/
cd Pillow
git checkout debian-arm Then building the source as detailed in the docs. |
Hugo,
Thank you for sending exactly what I needed !!
You wrote:
You can test this out with:
git clone https://github.com/wiredfool/Pillow/
cd Pillow
git checkout debian-arm
Then building the source as detailed in the docs <https://pillow.readthedocs.io/en/4.3.x/installation.html#building-from-source> .
I added a folder /home/pi/Hyperspy/Pillow
And followed your (above) instructions which populated the local Pillow folder. (YEA)
then
pi@raspberrypi:~/Hyperspy $ CFLAGS=”-I/home/pi/Hyperspy/Pillow” pip3 install Pillow –no-cache-dir
but it still downloads the old version 4.3.0
I moved the Pillow folder to /home/pi/ (out of the Hyperspy folder to the same level)
pi@raspberrypi:~ $ pip3 install Pillow –no-cache-dir
and tried:
cd Pillow
pi@raspberrypi:~/Pillow $ pip3 install Pillow –no-cache-dir
but it still downloads the old version 4.3.0
Obviously, I can NOT follow the instructions in the above link docs.
Could you please help me with the command to build Pillow? SORRY.
Thank you and Peace,
Gerard
From: Hugo [mailto:notifications@github.com]
Sent: Monday, November 13, 2017 11:03 PM
To: python-pillow/Pillow <Pillow@noreply.github.com>
Cc: gerardgilliland <gerardg@modelsw.com>; Comment <comment@noreply.github.com>
Subject: Re: [python-pillow/Pillow] Fix setup.py on debian (#2853)
You can test this out with
git clone https://github.com/wiredfool/Pillow/
cd Pillow
git checkout debian-arm
Then building the source as detailed in the docs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#2853 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ANjAnEHNuilyFJmHR-gxQldp7ZmaZM63ks5s2S0EgaJpZM4Qbokk> . <https://github.com/notifications/beacon/ANjAnK2OGZ0h0k7ydv9qM5EZjjkFz3y5ks5s2S0EgaJpZM4Qbokk.gif>
|
Once you have the prerequisites in place, don't 'pip install pillow', which installs the last release from PyPI, but instead run 'python setup.py install' from the cloned Pillow directory. |
Hugo,
Thank you for your instructions – they are spot on.
I am going to need your help again !!
I’m sorry.
See attached installPillow.txt
It started out good but ended with:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Reading: https://pillow.readthedocs.io/en/latest/installation.html
it looks like I need to install libjpeg which I am NOT capable of doing.
I did find libjpeg.so but don’t know what to do with it.
The internet (link is in the attached file) said by installing python-imaging, libjpeg would be installed as part installation.
But it didn’t seem to help.
Maybe I’m hung up on libjpeg and should be trying other options.
I hope the bochecha / Wiredfool fix includes the libjpeg install and it is my failure to select the proper prerequisites.
Thank you and Peace,
Gerard
From: Hugo [mailto:notifications@github.com]
Sent: Tuesday, November 14, 2017 1:42 PM
To: python-pillow/Pillow <Pillow@noreply.github.com>
Cc: gerardgilliland <gerardg@modelsw.com>; Comment <comment@noreply.github.com>
Subject: Re: [python-pillow/Pillow] Fix setup.py on debian (#2853)
Once you have the prerequisites in place, don't 'pip install pillow', which installs the last release from PyPI, but instead run 'python setup.py install' from the cloned Pillow directory.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#2853 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ANjAnBNHQhcEsxjXvCnNTlUFITZ74Qqeks5s2fswgaJpZM4Qbokk> . <https://github.com/notifications/beacon/ANjAnD-pAF7Ur3aDmeDAWMFMNbyHvxKnks5s2fswgaJpZM4Qbokk.gif>
pi@raspberrypi:~ $ git clone https://github.com/wiredfool/Pillow/
Cloning into 'Pillow'...
remote: Counting objects: 30670, done.
remote: Total 30670 (delta 0), reused 0 (delta 0), pack-reused 30670
Receiving objects: 100% (30670/30670), 26.01 MiB | 1.38 MiB/s, done.
Resolving deltas: 100% (21407/21407), done.
pi@raspberrypi:~ $ cd Pillow
pi@raspberrypi:~/Pillow $ git checkout debian-arm
Branch debian-arm set up to track remote branch debian-arm from origin.
Switched to a new branch 'debian-arm'
pi@raspberrypi:~/Pillow $ sudo python3 setup.py install
running install
running bdist_egg
running egg_info
creating Pillow.egg-info
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing top-level names to Pillow.egg-info/top_level.txt
writing Pillow.egg-info/PKG-INFO
writing manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis/*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
writing manifest file 'Pillow.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build
creating build/lib.linux-armv7l-3.5
creating build/lib.linux-armv7l-3.5/PIL
copying PIL/_util.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageEnhance.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/CurImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GimpGradientFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ContainerIO.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/OleFileIO.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PyAccess.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/IptcImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageTransform.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/SunImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/MicImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImagePalette.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageCms.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/MspImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/McIdasImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/BdfFontFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/_tkinter_finder.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FliImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageMorph.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageMode.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FontFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageChops.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageSequence.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageDraw.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/JpegPresets.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/features.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TarIO.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PcfFontFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageGrab.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/version.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageFilter.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageFont.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageColor.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageStat.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GifImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/Image.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImagePath.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PngImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GdImageFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/_binary.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PSDraw.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/WalImageFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/__init__.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ExifTags.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/PdfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/TiffTags.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageShow.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/XbmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageOps.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageQt.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageWin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageTk.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
copying PIL/ImageMath.py -> build/lib.linux-armv7l-3.5/PIL
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 "setup.py", line 771, in <module>
zip_safe=not (debug_build() or PLATFORM_MINGW), )
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 24, in run
self.build()
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "setup.py", line 562, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: jpeg
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 783, 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
searching for libjpeg
https://raspberrypi.stackexchange.com/questions/9361/how-do-i-enable-jpeg-support-with-pil
pi@raspberrypi:~/Pillow $ find /usr/lib -name libjpeg.so
/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/arm/libjpeg.so
pi@raspberrypi:~/Pillow $ sudo ln -s /usr/lib/arm-linux-gnueabihf/libjpeg.so /usr/lib/
pi@raspberrypi:~/Pillow $
pi@raspberrypi:~/Pillow $ pip3 install --user libjpeg
Collecting libjpeg
Could not find a version that satisfies the requirement libjpeg (from versions: )
No matching distribution found for libjpeg
pi@raspberrypi:~/Pillow $ sudo apt-get install python-imaging
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
python-imaging
0 upgraded, 1 newly installed, 0 to remove and 124 not upgraded.
Need to get 50.5 kB of archives.
After this operation, 86.0 kB of additional disk space will be used.
Get:1 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf python-imaging all 4.0.0-4 [50.5 kB]
Fetched 50.5 kB in 1s (25.7 kB/s)
Selecting previously unselected package python-imaging.
(Reading database ... 128207 files and directories currently installed.)
Preparing to unpack .../python-imaging_4.0.0-4_all.deb ...
Unpacking python-imaging (4.0.0-4) ...
Setting up python-imaging (4.0.0-4) ...
pi@raspberrypi:~/Pillow $
retry
pi@raspberrypi:~/Pillow $ sudo python3 setup.py install
running install
running bdist_egg
running egg_info
writing Pillow.egg-info/PKG-INFO
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing top-level names to Pillow.egg-info/top_level.txt
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.travis'
warning: no previously-included files found matching '.travis/*'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
writing manifest file 'Pillow.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
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 "setup.py", line 771, in <module>
zip_safe=not (debug_build() or PLATFORM_MINGW), )
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 24, in run
self.build()
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "setup.py", line 562, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: jpeg
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 783, 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
pi@raspberrypi:~/Pillow $
pi@raspberrypi:~/Pillow $ sudo apt-get install python3-pillow
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'python3-pil' instead of 'python3-pillow'
python3-pil is already the newest version (4.0.0-4).
0 upgraded, 0 newly installed, 0 to remove and 124 not upgraded.
pi@raspberrypi:~/Pillow $
|
Merging. @gerardgilliland Would you like to open a new issue? |
Hugo: With your help, Yes. I know how to install and run However, No. I am simply testing the app and the original failure defined by bochecha still exists. So, Maybe. I will look at wiredfool’s code in the cloned Pillow folder. That is my perspective. Please correct me where I am wrong. Thank you and Peace, |
if arch_tp == ("x86_64", "32bit"): | ||
# 32-bit build on 64-bit machine. | ||
# This should be correct on debian derivatives. | ||
if plat.dist()[0].lower() in ('debian', 'ubuntu'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platform.dist()
is deprecated and will be removed in Python 3.7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Some batteries included I guess.
Fixes #2851 .
Apparently Debian strips out all the platform detection code when building .debs, and we're missing support for some arm variants. But since that support is missing, we pop an error when we don't detect the linux version.
Changes proposed in this pull request: