python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
12.28k stars 2.23k forks source link

Can't install Pillow on Android #1957

Closed Rudloff closed 8 years ago

Rudloff commented 8 years ago

What did you do?

I'm running Python on Android (with Termux). I'm trying to install Pillow by running pip install Pillow.

What did you expect to happen?

Install Pillow.

What actually happened?

Collecting Pillow
  Using cached Pillow-3.2.0.zip
Installing collected packages: Pillow
  Running setup.py install for Pillow ... error
    Complete output from command /data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-build-ufp_l0v2/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /data/data/com.termux/files/usr/tmp/pip-403p6uq1-record/install-record.txt --single-version-externally-managed --compile:
    Exception installing mp_compile, proceeding without:This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.5
    creating build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageGrab.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/TiffImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/MicImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/FitsStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ExifTags.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageChops.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/CurImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageEnhance.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/WebPImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PngImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/DcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/TgaImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PsdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/JpegPresets.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/GimpPaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/GbrImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/OleFileIO.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PSDraw.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/_binary.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageSequence.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/DdsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/McIdasImagePlugin.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/PdfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/JpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/FontFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PcxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/WalImageFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageQt.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/IcnsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/BufrStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/EpsImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/TiffTags.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/BmpImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/MpoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/GimpGradientFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/SgiImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageCms.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageDraw2.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageStat.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/SpiderImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageWin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/__init__.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImagePalette.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/FtexImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/Image.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/SunImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageFont.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageTk.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/TarIO.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageShow.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/XpmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageColor.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PyAccess.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/GifImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImagePath.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageFilter.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageMode.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/features.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/GdImageFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ContainerIO.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/MspImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PalmImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageMath.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/FliImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/MpegImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PcfFontFile.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/ImageDraw.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PixarImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/BdfFontFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/FpxImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/IcoImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImtImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PcdImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/PaletteFile.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/_util.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/ImageMorph.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/XVThumbImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/WmfImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    copying PIL/GribStubImagePlugin.py -> build/lib.linux-armv7l-3.5/PIL
    running 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
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'Pillow.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.sh'
    no previously-included directories found matching 'docs/_static'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.landscape.yaml'
    warning: no previously-included files found matching 'appveyor.yml'
    warning: no previously-included files found matching 'build_children.sh'
    warning: no previously-included files found matching 'tox.ini'
    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
    writing manifest file 'Pillow.egg-info/SOURCES.txt'
    copying PIL/OleFileIO-README.md -> build/lib.linux-armv7l-3.5/PIL
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/data/data/com.termux/files/usr/tmp/pip-build-ufp_l0v2/Pillow/setup.py", line 767, in <module>
        zip_safe=not debug_build(), )
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/data/data/com.termux/files/usr/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/command/install.py", line 539, in run
        self.run_command('build')
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/data/data/com.termux/files/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
        self.build_extensions()
      File "/data/data/com.termux/files/usr/tmp/pip-build-ufp_l0v2/Pillow/setup.py", line 512, in build_extensions
        ' using --disable-%s, aborting' % (f, f))
    ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting

    ----------------------------------------
Command "/data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-build-ufp_l0v2/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /data/data/com.termux/files/usr/tmp/pip-403p6uq1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-build-ufp_l0v2/Pillow/

What versions of Pillow and Python are you using?

I'm running Python 3.5.1. I'm trying to install Pillow 3.2.0.

From what I understand, zlib is already included in Android so I shouldn't need to install it.

wiredfool commented 8 years ago

You need to have the headers for the libraries as well, and more importantly, Pillow has to be able to find them. I'm not aware of Pillow being built for Android before, so it's entirely possible that the libraries/headers are not in the usual places.

There's a reasonable amount of information about how to install in the documentation, you're going to be in the building from source on linux section.

Rudloff commented 8 years ago

I do have the headers at /data/data/com.termux/files/usr/include/zlib.h but it does not find them even if I specify the path manually with CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install Pillow. Everything else seems to build correctly if I do python setup.py build_ext --disable-zlib

wiredfool commented 8 years ago

Then it's not finding the library. You should try installing from master, with python setup.py build_ext --debug, which will show where it's looking for libraries and headers.

Rudloff commented 8 years ago

You were right, it was not looking in the right directory. I had to run with LDFLAGS="-L/system/lib/" and it worked. Thanks for your help!

vvacha commented 8 years ago

I have the same problem. but I did not understand how to solve.

Rudloff commented 8 years ago

I installed it like this:

LDFLAGS="-L/system/lib/" pip install Pillow
vvacha commented 8 years ago

sorry. I'm starting developer.  I'm in this directory /data/data/com.termux/files/usr/lib/python3.5/site-packages insert string LDFLAGS = "- L / system / lib /" pip install Pillow but I get the same error

Воскресенье, 7 августа 2016, 21:11 +04:00 от Pierre Rudloff notifications@github.com:

I installed it like this: LDFLAGS="-L/system/lib/" pip install Pillow — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or mute the thread .

micechal commented 7 years ago

In my case, I had to install Pillow using the following command: LDFLAGS="-L/system/lib/ -lm -lcompiler_rt" pip2 install Pillow --global-option="build_ext" --global-option="--disable-jpeg" For this to work, you'll need to apt install python2-dev first, if you haven't installed it already. Notes:

  1. This solution is for Python 2.x; YMMV for Python 3.
  2. You won't get jpeg support when installing Pillow this way
wafflespeanut commented 7 years ago

Also, note that you don't really need to --disable-jpeg (which disables JPEG support). You can just apt install libjpeg-turbo-dev (or openjpeg-dev), and it should be good to go :)

BiBzz commented 7 years ago

After trying a lot of solutions, the one which works for me was LDFLAGS="-L/system/lib/" CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install Pillow

But I don't know yet if it's only due to it or caused by a combination... Anyway if it can help!

biazzotto commented 7 years ago

I don't have "/data/data/com.termux/files/usr/include/zlib.h" on my Zenfone 2. Is that possible to install Pillow on a Zenfone 2?

Rudloff commented 7 years ago

@biazzotto I think you need to install the ndk-sysroot package in Termux.

biazzotto commented 7 years ago

It does the trick: $ pkg install python libjpeg-turbo libcrypt ndk-sysroot clang zlib $ LDFLAGS="-L${PREFIX}/lib/" CFLAGS="-I${PREFIX}/include/" pip install --upgrade wheel pillow

Thank you, @Russell-Jones-OxPhys, for the fixes...

remo7777 commented 6 years ago

screenshot_20180317-121819 install successfully when i tried other devices it fail with pip2

m-Afnan2018 commented 6 years ago

Guys!!! I don't have zlib.h in my Android... How can I get this file???

Rudloff commented 6 years ago

@mAfnanm You need to install the ndk-sysroot package (if you are using Termux, if not you need to manually get it from the Android NDK).

XSecr3t commented 6 years ago

Using this command It works properly!

LDFLAGS="-L/system/lib/ -lm -lcompiler_rt" pip2 install Pillow --global-option="build_ext" --global-option="--disable-jpeg"

Thanks haha but i have another arror,my module requests is missing Can anyone tell me what is it?

radarhere commented 6 years ago

@XSecr3t https://pypi.org/project/requests/

XSecr3t commented 6 years ago

@radarHere i already installed pillow But new error show up

Requests module not found,otherwise i already installed too in my termux Clarifai not found Grpcio not found

radarhere commented 6 years ago

@XSecr3t I'm having a bit of trouble understanding you. You say that you have installed Pillow successfully. You then asked what the 'requests' module was, to which I have linked. If you're asking what 'clarifai' and 'grpcio' are, they also look like modules - https://pypi.org/project/clarifai/ and https://pypi.org/project/grpcio/. None of these have to do with Pillow however, so they are requirements from another part of your program.

XSecr3t commented 6 years ago

@radarhere but it should be installed on my termux,cause the program that i want installed need that both of modules. That's why i need both of that modules

So what i gonna do?

TheoRet commented 5 years ago

Hello, I'm trying to install Pillow on Termux (current F-Droid version) for Lineage 15.1 (not rooted). I installed the following packages without problem:

pkg install python python-dev libjpeg-turbo-dev libcrypt-dev ndk-sysroot clang

Then I tried the following:

LDFLAGS="-L/system/lib/" CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install wheel pillow

I still get the error:

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

When I add the" disable-zlib" option, pillow is installed successfully.. But that's no solution as I want to work with png files.

Inside the folder /data/data/com.termux/files/usr/lib I can find the file libz.so.1.2.11 As well as two symlinks to it libz.so libz.so.1

I checked the folder /data/data/com.termux/files/usr/include, there are no zlib related files inside. Shouldn't the zlib.h file be here? what else could be going wrong?

Rudloff commented 5 years ago

I think you need to install zlib-dev.

TheoRet commented 5 years ago

Thanks for the quick answer! :-)

zlib.h now exists in the include folder and installation worked without problems.

FVitor7 commented 5 years ago

how to install zlib-dev?

TheoRet commented 5 years ago

pkg install zlib-dev

Together with the other dependencies that would be:

pkg install python python-dev libjpeg-turbo-dev libcrypt-dev ndk-sysroot clang zlib-dev

(although it seems that libcrypt-dev is not mandatory for installation)

And also I did not need all the pip flags anymore, simply pip install pillow did it.

comk88 commented 5 years ago

I've the same problem,finally I try: pkg install libcrypt libjpeg-turbo clang then: pip install Pillow , all is ok,good luck

Russell-Jones commented 5 years ago

Looks like termux has changed the arrangement of files, at least for some Android versions/ARM CPU versions. I needed pkg install libjpeg-turbo clang ndk-root libcrypt zlib python (no -dev packages) then

export LDFLAGS='-L/data/data/com.termux/files/usr/lib/'
export CFLAGS='-I/data/data/com.termux/files/usr/include/'

not /system/lib (which caused linking problems? it contains 32-bit binaries, anyway) or /system/lib64/

Then I was able to pip install Pillow.

longdanie commented 5 years ago

I can't install Pillow on my termux, some of the errors:

ERROR: Exception:
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 397, in _error_catcher yield
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 479, in read data = self._fp.read(amt)
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read data = self.__fp.read(amt)
File "/data/data/com.termux/files/usr/lib/python3.7/http/client.py", line 457, in read n = self.readinto(b)
File "/data/data/com.termux/files/usr/lib/python3.7/http/client.py", line 501, in readinto n = self.fp.readinto(b)
File "/data/data/com.termux/files/usr/lib/python3.7/socket.py", line 589, in readinto return self._sock.recv_into(b)
File "/data/data/com.termux/files/usr/lib/python3.7/ssl.py", line 1071, in recv_into return self.read(nbytes, buffer)
File "/data/data/com.termux/files/usr/lib/python3.7/ssl.py", line 929, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 188, in main status = self.run(options, args) File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 345, in run resolver.resolve(requirement_set)
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 196, in resolve self._resolve_one(requirement_set, req)
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 359, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 307, in _get_abstract_dist_for self.require_hashes
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 199, in prepare_linked_requirement progress_bar=self.progress_bar
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/download.py", line 1064, in unpack_url progress_bar=progress_bar
File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/pip/_internal/download.py", line 924, in unpack_http_url progress_bar)

sabbir2609 commented 5 years ago

install micro and try again Screenshot_20191025-180612

T0MuX commented 5 years ago

screenshot_20180317-121819 install successfully when i tried other devices it fail with pip2

Sorry for the totally out of topic, but I couldn't find any other way than this one to contact you... what is your keyboard application ??? I looked the whole web and didnt found ! I'm interested ^^ thank you by advance

harshraj22 commented 4 years ago

pkg install zlib-dev

Together with the other dependencies that would be:

pkg install python python-dev libjpeg-turbo-dev libcrypt-dev ndk-sysroot clang zlib-dev

(although it seems that libcrypt-dev is not mandatory for installation)

And also I did not need all the pip flags anymore, simply pip install pillow did it.

Thanks. Worked for me 😁

Russell-Jones-OxPhys commented 4 years ago

Looks like termux has changed the arrangement of files, at least for some Android versions/ARM CPU versions. I needed pkg install libjpeg-turbo clang ndk-root libcrypt zlib python (no -dev packages) then

export LDFLAGS='-L/data/data/com.termux/files/usr/lib/'
export CFLAGS='-I/data/data/com.termux/files/usr/include/'

not /system/lib (which caused linking problems? it contains 32-bit binaries, anyway) or /system/lib64/

Then I was able to pip install Pillow.

Just tried this again with my new 3.8.0 virtualenv, and it still works. This is on a Moto G7 which uname -a indicates is aarch64

crtrue commented 4 years ago

Pixel 3a XL running Android 10. As mentioned above, the -dev packages don't seem to be necessary anymore to get Pillow to install. I got mine installed with just:

pkg install python libjpeg-turbo libcrypt ndk-sysroot clang zlib

Some of these were redundant and already installed, but afterwards Pillow no longer threw a fit.

hugovk commented 4 years ago

The docs have just been updated in https://github.com/python-pillow/Pillow/pull/4209 to remove mention of the dev packages.

emlinhax commented 4 years ago

@crtrue Your solution fixed it for me :))

quick-wq commented 4 years ago

actual on 7 July 2020, pkg install python libjpeg-turbo libcrypt ndk-sysroot clang zlib pip install pillow

thanks @crtrue

IT WORKS

alexdeathway commented 4 years ago

Try this, if wheel problem arise:

pip install wheel 
pkg install libjpeg-turbo LDFLAGS="-L/system/lib/" CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install Pillow

Credit: 💻Stackoverflow

📱Termux

T0MuX commented 4 years ago

@zexxxer-prog & @alexdeathway None of your trick works for me. See :

-- EDIT -- Okay sorry, this was GCC related in my case ! I used gcc latest (v10) instead of gcc-8, and the install of pillow worked like a charm with pip install pillow :D so thank you !