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

Pillow setup.py find_library_file logic issue #3244

Closed
tao12345666333 opened this issue Jul 9, 2018 · 6 comments
Closed

Pillow setup.py find_library_file logic issue #3244

tao12345666333 opened this issue Jul 9, 2018 · 6 comments
Labels
Installation Usually a problem with …

Comments

@tao12345666333
Copy link

tao12345666333 commented Jul 9, 2018

What did you do?

Install Pillow by source code

What did you expect to happen?

Install successfully.

What actually happened?

Build error.

  During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-_pl57v2h/setup.py", line 807, in <module>
    raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:

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

What versions of Pillow and Python are you using?

Pillow:
Pillow-5.2.0
Python:
Python 3.7.0

detail see: docker-library/python#305

Because the library_dirs lose /usr/lib/x86_64-linux-gnu or /lib/x86_64-linux-gnu

@tao12345666333
Copy link
Author

The https://github.com/python-pillow/Pillow/blob/5.2.x/setup.py#L736 dpkg-architecture tool need install dpkg-dev to use.

@pslacerda
Copy link
Contributor

The following warn/todo happened: https://github.com/python-pillow/Pillow/blob/5.2.x/setup.py#L340

pslacerda added a commit to pslacerda/Pillow that referenced this issue Jul 9, 2018
pslacerda added a commit to pslacerda/Pillow that referenced this issue Jul 9, 2018
@radarhere radarhere added the Installation Usually a problem with … label Jul 9, 2018
pslacerda added a commit to pslacerda/Pillow that referenced this issue Jul 9, 2018
pslacerda added a commit to pslacerda/Pillow that referenced this issue Jul 9, 2018
@radarhere
Copy link
Member

@tao12345666333 so to be clear, if you install dpkg-dev, installation works fine, and you're just interested in Pillow installation working without that requirement?

@tao12345666333
Copy link
Author

@radarhere yes. I want to find a way install Pillow without dpkg-dev requirement.

@hugovk
Copy link
Member

hugovk commented Sep 16, 2018

docker-library/python#305 (comment) says:

dpkg-dev has not existed in the python:3 image since docker-library/python@cd1f11a. This is an oversight on our part and we will look to change the build dependency installation to be more like docker-library/php#556 so that this won't happen in the future.

It was added back in docker-library/python#310.

Does that fix it?

@tao12345666333
Copy link
Author

@hugovk Thanks. It has fixed.

(Tao) ➜  docker git:(master) ✗ docker run -it --rm python:3.7.0-stretch /bin/bash
root@f1eb0b20daa2:/# cd /tmp/
root@f1eb0b20daa2:/tmp# 
root@f1eb0b20daa2:/tmp# wget https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz 
--2018-09-18 03:07:52--  https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.65.63, 151.101.193.63, 151.101.1.63, ...
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.65.63|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14499068 (14M) [binary/octet-stream]
Saving to: ‘Pillow-5.2.0.tar.gz’

Pillow-5.2.0.tar.gz            100%[===================================================>]  13.83M  8.53MB/s    in 1.6s    

2018-09-18 03:07:55 (8.53 MB/s) - ‘Pillow-5.2.0.tar.gz’ saved [14499068/14499068]

root@f1eb0b20daa2:/tmp# pip install Pillow-5.2.0.tar.gz 
Processing ./Pillow-5.2.0.tar.gz
Building wheels for collected packages: Pillow
  Running setup.py bdist_wheel for Pillow ... done
  Stored in directory: /root/.cache/pip/wheels/19/4b/f9/db70c6f140d97dc73399e3b03ce2c748c2b09f8e507d325f27
Successfully built Pillow
Installing collected packages: Pillow
Successfully installed Pillow-5.2.0
root@f1eb0b20daa2:/tmp# 
root@f1eb0b20daa2:/tmp# 


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Installation Usually a problem with …
Projects
None yet
Development

No branches or pull requests

4 participants