Buildozer failed to execute the last command: The headers or library files could not be found for zlib

77
April 05, 2022, at 08:00 AM

I have been trying to generate an .apk with buildozer. The .apk is successfully generated, but it crashes each time due to the following error:

setup.py build_ext -v
  File "setup.py", line 622, in build_extensions
    raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib
  STDOUT:
running build_ext

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

I have tried all the possible solutions found for similar errors, such as:

Downgrade pip:

python -m pip install pip==19.3.1 

Change Pillow's version:

pip install  Pillow==6.2.2

Installed the following packages:

sudo apt-get python-dev py-pip jpeg-dev zlib-dev
sudo apt-get install libjpeg-dev zlib1g-dev

But none of them solved the problem. I'm using Python version 3.8.12. And I'm running on WSL:Ubuntu virtual machine.

I would very much appreciate any help.

Answer 1

I was able to bypass the issue by using cv2 instead of Pillow, definitely not the best approach.

Rent Charter Buses Company
READ ALSO
Python.NET: How to access generic member of an interface

Python.NET: How to access generic member of an interface

I am trying to use a generic member from an interface in FlaUI through PythonNET

112
Python: Error occurred when learning with Tensorflow using levenberg marquardt library

Python: Error occurred when learning with Tensorflow using levenberg marquardt library

I'm new to TensorflowI'm trying to create a network like this: ・ Input layer: 400 pieces ・ Hidden layer: 20 pieces, activation functions tanh ・ Output layer: 1 pieces, activation function sigmoid ・ Optimization method: levenberg marquardt ・ Library...

86
How to open a new MDI sub-window in PyQt5?

How to open a new MDI sub-window in PyQt5?

What I want to do is to open a new Countrypage sub-window by clicking on the "New" button which is in Countrypage itself

116
Finding optimal nearest neighbour pairs

Finding optimal nearest neighbour pairs

I am writing a "colocalization" script to identify unique co-localized pairs of coordinates between two sets of dataMy data is quite large with <100k points in each set so performance is pretty important

113