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

Error while installing Pillow on Windows – Building wheel for Pillow (pyproject.toml) ... error #8774

Open
IrfanFathan opened this issue Feb 25, 2025 · 3 comments
Labels

Comments

@IrfanFathan
Copy link

IrfanFathan commented Feb 25, 2025

What did you do?

I tried to install Pillow using:

pip install Pillow

What did you expect to happen?

Pillow should have installed successfully without errors.

What actually happened?

The installation failed with the following error:

Building wheel for Pillow (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for Pillow (pyproject.toml) did not run successfully.

What are your OS, Python, and Pillow versions?

  • OS: Windows 11
  • Pillow: Not installed yet, as installation failed.

`

@radarhere
Copy link
Member

radarhere commented Feb 25, 2025

Python: Run python --version

What does python --version output?

Rather than using pip install Pillow, could you try python -m pip install Pillow moving forward? Sometimes people have multiple versions of Python installed, and it confuses things.

The installation failed with the following error:
...
│ exit code: 1

Was there additional output after this?

@ajayita
Copy link

ajayita commented Feb 26, 2025

I'm having a similar issue. Probably exactly the same. Windows 11 etc.

pip3 install --upgrade setuptools wheel
Requirement already satisfied: setuptools in c:\users\thedude\appdata\local\programs\python\python313\lib\site-packages (75.8.1)
Requirement already satisfied: wheel in c:\users\thedude\appdata\local\programs\python\python313\lib\site-packages (0.45.1)
PS C:\Users\thedude> python -m pip install --upgrade pip setuptools wheel
Requirement already satisfied: pip in c:\users\thedude\appdata\local\programs\python\python313\lib\site-packages (25.0.1)
Requirement already satisfied: setuptools in c:\users\thedude\appdata\local\programs\python\python313\lib\site-packages (75.8.1)
Requirement already satisfied: wheel in c:\users\thedude\appdata\local\programs\python\python313\lib\site-packages (0.45.1)

pip cache purge
Files removed: 819 (412.1 MB)
PS C:\Users\thedude>

 pip install Pillow==10.1.0
Collecting Pillow==10.1.0
  Downloading Pillow-10.1.0.tar.gz (50.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.8/50.8 MB 17.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "C:\Users\thedude\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "C:\Users\thedude\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\thedude\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\thedude\AppData\Local\Temp\pip-build-env-j3gbyr1y\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\thedude\AppData\Local\Temp\pip-build-env-j3gbyr1y\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "C:\Users\thedude\AppData\Local\Temp\pip-build-env-j3gbyr1y\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 30, in <module>
        File "<string>", line 27, in get_version
      KeyError: '__version__'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

PS C:\Users\thedude> python --version
Python 3.13.1
PS C:\Users\thedude>

@radarhere
Copy link
Member

Pillow 10.1 was released in October 2023 before Python 3.13 was released in October 2024, and so didn't offer support for it. See https://pillow.readthedocs.io/en/stable/installation/python-support.html

Is there a reason you don't want to install Pillow >= 11?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants