lllyasviel / lllyasviel/stable-diffusion-webui-forge

ERROR: Failed to build installable wheels for some pyproject.toml based projects (Pillow)

Open
#1,789 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I tied both docker and non docker install using `venv` but error seems to the same.
Here is the trace:

```
snip....
copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-cpython-312/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-cpython-312/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-cpython-312/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing requirements to src/Pillow.egg-info/requires.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no files found matching '*.txt'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.clang-format'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching 'renovate.json'
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
no previously-included directories found matching '.ci'
adding license file 'LICENSE'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
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 "/tmp/pip-install-g3e107g4/pillow_ac5582fee66e44aa96d2189fe0bc04ae/setup.py", line 993, in
setup(
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 384, in run
self.run_command("build")
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/home/user/ai-stack/stable-diffusion-webui-forge/.venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/tmp/pip-install-g3e107g4/pillow_ac5582fee66e44aa96d2189fe0bc04ae/setup.py", line 809, in build_extensions
raise RequiredDependencyException(f)
RequiredDependencyException: jpeg

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-g3e107g4/pillow_ac5582fee66e44aa96d2189fe0bc04ae/setup.py", line 1010, in
raise RequiredDependencyException(msg)
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

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for Pillow
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (Pillow)
```

this is what I did:
1. Clone the repo
2. `python3 -m venv .venv`
3. `source .venv/bin/activate`
4. pip install --upgrade pip setuptools wheel
5. pip install Pillow==9.5.0 (fails)
6. pip install Pillow (installs successfully)
7. `./webui.sh`

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the install steps with Python 3.12, first using Pillow==9.5.0 and then the unpinned Pillow install, before running ./webui.sh. The report names no repository file or expected code change, so inspect the installation path and dependency declarations to determine whether the project or Pillow installation is responsible and what a successful outcome should be.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.