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 installing Pillow in PyPy #6412

Closed
Ad101DP opened this issue Jul 3, 2022 · 5 comments
Closed

Error installing Pillow in PyPy #6412

Ad101DP opened this issue Jul 3, 2022 · 5 comments

Comments

@Ad101DP
Copy link

Ad101DP commented Jul 3, 2022

When I try to install Pillow in PyPy the installation fails. I tried with "pypy -m pip install pillow", also with "pypy -m pip install --upgrade pillow", I have the last version of PyPy and pip, the error is:

      Traceback (most recent call last):
        File "C:\Users\user\AppData\Local\Temp\pip-install-62z6bjbm\pillow_b00e7c0dc96743cda3576534ac2319d3\setup.py", line 995, in <module>
          setup(
        File "C:\Program Files\pypy3.9-v7.3.9-win64\lib\site-packages\setuptools\__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\core.py", line 148, in setup
          dist.run_commands()
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\dist.py", line 985, in run_command
          cmd_obj.run()
        File "C:\Program Files\pypy3.9-v7.3.9-win64\lib\site-packages\setuptools\command\install.py", line 61, in run
          return orig.install.run(self)
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\command\install.py", line 553, in run
          self.run_command('build')
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\dist.py", line 985, in run_command
          cmd_obj.run()
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\command\build.py", line 135, in run
          self.run_command(cmd_name)
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\dist.py", line 985, in run_command
          cmd_obj.run()
        File "C:\Program Files\pypy3.9-v7.3.9-win64\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
          _build_ext.run(self)
        File "C:\Program Files\pypy3.9-v7.3.9-win64\Lib\distutils\command\build_ext.py", line 343, in run
          self.build_extensions()
        File "C:\Users\user\AppData\Local\Temp\pip-install-62z6bjbm\pillow_b00e7c0dc96743cda3576534ac2319d3\setup.py", line 810, in build_extensions
          raise RequiredDependencyException(f)
      RequiredDependencyException: zlib

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-62z6bjbm\pillow_b00e7c0dc96743cda3576534ac2319d3\setup.py", line 1015, in <module>
          raise RequiredDependencyException(msg)
      RequiredDependencyException:

      The headers or library files could not be found for zlib,
      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: legacy-install-failure

× Encountered error while trying to install package.
Ôò░ÔöÇ> pillow

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
@radarhere radarhere added Windows Installation Usually a problem with … labels Jul 3, 2022
@hugovk
Copy link
Member

hugovk commented Jul 3, 2022

Duplicate of #6405.

We don't have precompiled binary wheels for PyPy3.9 because it's a beta release:

So instead it's trying to build from source, and it can be tricky to set up the compiler on Windows. See:

Instead, you might be best off using PyPy3.8, which does have wheels available.

@radarhere radarhere changed the title Error installing Pillow in pypy Error installing Pillow in PyPy Jul 4, 2022
@radarhere
Copy link
Member

@Ad101DP did either of those options (downgrading or compiling from source) work for you?

@github-actions
Copy link

Closing this issue as no feedback has been received.

@nulano
Copy link
Contributor

nulano commented Oct 30, 2022

In case it is helpful, there were unofficial wheels for PyPy3.9 uploaded in the release ticket for Pillow 9.3.0:
Linux: #6460 (comment)
Windows: #6460 (comment)

@radarhere
Copy link
Member

PyPy3.9 has now been released, and #6782 has added prebuilt wheels for Windows for the next Pillow release.

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

No branches or pull requests

4 participants