我无法安装Image_slicer库



我正在尝试安装image_slicer,但pip无法安装PIL,这是它的依赖项之一。我可以安装最新版本的PIL,但image_slicer想要一个不同的版本。那是我自己无法下载的。只需阅读错误的底部。我从错误消息中删除了很多重复,但没有任何重要内容。我使用Python 3.10‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

PS I:Python Files> pip install image_slicer
Collecting image_slicer
Using cached image_slicer-2.1.1-py2.py3-none-any.whl (8.3 kB)
Collecting Pillow==7.2.0
Using cached Pillow-7.2.0.tar.gz (39.1 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: Pillow
Building wheel for Pillow (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [184 lines of output]
C:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py:42: RuntimeWarning: Pillow 7.2.0 does not support Python 3.10 and 
does not provide prebuilt Windows binaries. We do not recommend building from source on Windows.
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win-amd64-cpython-310
creating buildlib.win-amd64-cpython-310PIL
copying srcPILBdfFontFile.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILBlpImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILPSDraw.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILPyAccess.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILSgiImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILSpiderImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILSunImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILTarIO.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILTgaImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILTiffImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILTiffTags.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILWalImageFile.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILWebPImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILWmfImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILXbmImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILXpmImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILXVThumbImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL_binary.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL_tkinter_finder.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL_util.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL_version.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL__init__.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL__main__.py -> buildlib.win-amd64-cpython-310PIL
running egg_info
writing srcPillow.egg-infoPKG-INFO
writing dependency_links to srcPillow.egg-infodependency_links.txt
writing top-level names to srcPillow.egg-infotop_level.txt
reading manifest file 'srcPillow.egg-infoSOURCES.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 previously-included files found matching '.appveyor.yml'
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 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 'srcPillow.egg-infoSOURCES.txt'
running build_ext


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:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py", line 864, in <module>
setup(
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools__init__.py", line 87, in setup     
return distutils.core.setup(**attrs)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscore.py", line 177, in setup
return run_commands(dist)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscore.py", line 193, in run_commands
dist.run_commands()
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilsdist.py", line 968, in run_commands
self.run_command(cmd)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptoolsdist.py", line 1217, in run_command 
super().run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:UsersjonatAppDataLocalPackagesPythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0LocalCachelocal-packagesPython310site-packageswheelbdist_wheel.py", 
line 299, in run
self.run_command('build')
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscmd.py", line 317, in run_command
self.distribution.run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptoolsdist.py", line 1217, in run_command 
super().run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptoolscommandbuild.py", line 24, in run  
super().run()
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscommandbuild.py", line 131, in run
self.run_command(cmd_name)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscmd.py", line 317, in run_command
self.distribution.run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptoolsdist.py", line 1217, in run_command 
super().run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscommandbuild_ext.py", line 339, in run
self.build_extensions()
File "C:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py", line 694, 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:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py", line 918, 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.
ERROR: Failed building wheel for Pillow
Running setup.py clean for Pillow
Failed to build Pillow
Installing collected packages: Pillow, image_slicer
Attempting uninstall: Pillow
Found existing installation: Pillow 9.2.0
Uninstalling Pillow-9.2.0:
Successfully uninstalled Pillow-9.2.0
Running setup.py install for Pillow ... error
error: subprocess-exited-with-error
× Running setup.py install for Pillow did not run successfully.
│ exit code: 1
╰─> [188 lines of output]
C:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py:42: RuntimeWarning: Pillow 7.2.0 does not support Python 3.10 and 
does not provide prebuilt Windows binaries. We do not recommend building from source on Windows.
warnings.warn(
running install
C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptoolscommandinstall.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 buildlib.win-amd64-cpython-310
creating buildlib.win-amd64-cpython-310PIL
copying srcPILBdfFontFile.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILBlpImagePlugin.py -> buildlib.win-amd64-cpython-310PIL
copying srcPILBmpImagePlugin.py -> buildlib.win-amd64-cpython-310PI
copying srcPIL_version.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL__init__.py -> buildlib.win-amd64-cpython-310PIL
copying srcPIL__main__.py -> buildlib.win-amd64-cpython-310PIL
running egg_info
writing srcPillow.egg-infoPKG-INFO
writing dependency_links to srcPillow.egg-infodependency_links.txt
writing top-level names to srcPillow.egg-infotop_level.txt
reading manifest file 'srcPillow.egg-infoSOURCES.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 previously-included files found matching '.appveyor.yml'
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 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 'srcPillow.egg-infoSOURCES.txt'
running build_ext


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:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py", line 864, in <module>
setup(
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools__init__.py", line 87, in setup     
return distutils.core.setup(**attrs)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscore.py", line 177, in setup
return run_commands(dist)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscmd.py", line 317, in run_command
self.distribution.run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptoolsdist.py", line 1217, in run_command 
super().run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilsdist.py", line 987, in run_command
cmd_obj.run()
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0libsite-packagessetuptools_distutilscommandbuild_ext.py", line 339, in run
self.build_extensions()
File "C:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py", line 694, 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:UsersjonatAppDataLocalTemppip-install-rl31cwgwpillow_84b6d513380140eb80330a2fd902d6easetup.py", line 918, 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.
Rolling back uninstall of Pillow
Moving to c:usersjonatappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packagespil
from C:UsersjonatAppDataLocalPackagesPythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0LocalCachelocal-packagesPython310site-packages~il
Moving to c:usersjonatappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packagespillow-9.2.0.dist-info  
from C:UsersjonatAppDataLocalPackagesPythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0LocalCachelocal-packagesPython310site-packages~illow-9.2.0.dist-info       
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> Pillow

您尝试从pypi安装,您解释说这很难。

相反,使用conda从https://anaconda.org/conda-forge/pillow,这很容易。二进制轮子排除了计算zlib dev文件详细信息的需要。

相关内容

  • 没有找到相关文章

最新更新