-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Windows: setup.py not searching path for libraries #6405
Comments
Hi. So you're just running setup.py directly. This is not actually our recommended method for building from source on Windows. https://pillow.readthedocs.io/en/stable/installation.html#building-on-windows
|
In addition to @radarhere's comment, if you really wish to use set LIB=%LIB%;%PATH%
set INCLUDE=%INCLUDE%;%PATH%
pypy setup.py install -v: |
I was originally trying to install through pip using I don't wish to use the |
By default, pip will look for prebuilt wheels on PyPI. There is a Pillow 9.1.1 wheel uploaded for PyPy3.8-7.3.x ( I'm assuming you are using PyPy3.9-7.3.9, which is incompatible with that wheel. As @radarhere pointed out above, triggering source builds directly (either with Your analysis of the build error (when not using the winbuild scripts) is:
My comment above demonstrates that you can easily pass the PATH variable to |
I think the disconnect for me is that if there is a prebuilt wheel, everything works perfect, but if there isn't a prebuilt wheel the fall back is to trigger the source build in a way that isn't recommended on Windows. This behavior seems odd to me. That being said. There are clear instructions on how to do the build the right way, so maybe this behavior isn't an actual problem and this issue should be closed. |
OS: Windows 11
Python: PyPy 7.3.9
Pillow: 9.1.1 / 9.2.0dev
When trying to build from source the setup script checks a handful of locations for zlib and libjpeg, but doesn't bother searching path folders on Windows, resulting in the error:
The headers or library files could not be found for zlib
Here is the output from
pypy -mpip install Pillow
is attached: pip_install_output.txtI was able to successfully install Pillow with the following hack to the
setup.py
file:Here is the successful output from
pypy setup.py install -v
: modified_setup_install_output.txtand the resulting
pip list
output after install.Naively searching the path folders, like I did, is likely less than ideal and requires a user to added the
lib
andinclude
directories for both zlib and libjpeg separately (my path below for reference).The text was updated successfully, but these errors were encountered: