fdintino / pillow-avif-plugin

A pillow plugin that adds avif support via libavif
BSD 2-Clause "Simplified" License
90 stars 13 forks source link

Problem installing it from pip #20

Closed Tosh0kan closed 1 year ago

Tosh0kan commented 1 year ago

When I try to install it with pip, it outputs this error.


Collecting pillow-avif-plugin
  Using cached pillow-avif-plugin-1.3.1.tar.gz (11 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pillow-avif-plugin
  Building wheel for pillow-avif-plugin (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\pillow_avif
      copying src\pillow_avif\AvifImagePlugin.py -> build\lib.win-amd64-cpython-311\pillow_avif
      copying src\pillow_avif\__init__.py -> build\lib.win-amd64-cpython-311\pillow_avif
      running build_ext
      building 'pillow_avif._avif' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\src
      creating build\temp.win-amd64-cpython-311\Release\src\pillow_avif
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tcsrc/pillow_avif/_avif.c /Fobuild\temp.win-amd64-cpython-311\Release\src/pillow_avif/_avif.obj
      _avif.c
      src/pillow_avif/_avif.c(4): fatal error C1083: Nao e possivel abrir arquivo incluir: 'avif/avif.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pillow-avif-plugin
  Running setup.py clean for pillow-avif-plugin
Failed to build pillow-avif-plugin
Installing collected packages: pillow-avif-plugin
  Running setup.py install for pillow-avif-plugin ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pillow-avif-plugin did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running install
      C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\pillow_avif
      copying src\pillow_avif\AvifImagePlugin.py -> build\lib.win-amd64-cpython-311\pillow_avif
      copying src\pillow_avif\__init__.py -> build\lib.win-amd64-cpython-311\pillow_avif
      running build_ext
      building 'pillow_avif._avif' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\src
      creating build\temp.win-amd64-cpython-311\Release\src\pillow_avif
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tcsrc/pillow_avif/_avif.c /Fobuild\temp.win-amd64-cpython-311\Release\src/pillow_avif/_avif.obj
      _avif.c
      src/pillow_avif/_avif.c(4): fatal error C1083: Nao e possivel abrir arquivo incluir: 'avif/avif.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [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-avif-plugin

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.```
NekonexDev commented 1 year ago

Any updates?

NekonexDev commented 1 year ago

I mean problem in your python version, try to update it

Archenemind commented 1 year ago

The problem must be that your python version is 3.11, I was getting the same error, until I tried in python 3.10 and it downloads it normally. Also if you have an old version it will give an error downloading it.

fdintino commented 1 year ago

I've uploaded the python 3.11 wheel for windows to PyPI, so this issue should be fixed.