Я создаю сайт электронной коммерции, используя код Django, но столкнулся с ошибкой при установке требований [закрыто]
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
Traceback (most recent call last):
File "C:\Users\MY PC\AppData\Local\Temp\pip-install-0t2cfsyb\pillow_f848d0aa6d444c8faf818219ccf20861\setup.py", line 852, in <module>
setup(
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\command\install.py", line 568, in run
self.run_command('build')
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\MY PC\AppData\Local\Programs\Python\Python310\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\MY PC\AppData\Local\Temp\pip-install-0t2cfsyb\pillow_f848d0aa6d444c8faf818219ccf20861\setup.py", line 687, in build_extensions
raise RequiredDependencyException(f)
__main__.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\MY PC\AppData\Local\Temp\pip-install-0t2cfsyb\pillow_f848d0aa6d444c8faf818219ccf20861\setup.py", line 903, in <module>
raise RequiredDependencyException(msg)
__main__.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.
WARNING: No metadata found in c:\users\my pc\appdata\local\programs\python\python310\lib\site-packages
Rolling back uninstall of pillow
Moving to c:\users\my pc\appdata\local\programs\python\python310\lib\site-packages\pil\
from C:\Users\MY PC\AppData\Local\Programs\Python\Python310\Lib\site-packages\~il
Moving to c:\users\my pc\appdata\local\programs\python\python310\lib\site-packages\pillow-9.0.1.dist-info\
from C:\Users\MY PC\AppData\Local\Programs\Python\Python310\Lib\site-packages\~illow-9.0.1.dist-info
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.
Вернуться на верх