问题描述
我刚刚在 pycharm windows 上运行 pip install枕头
但它给出了一个错误,如下所述帮助我解决这个问题
I just ran pip install pillow
on pycharm windows but it gives an error as mentioned below help me to solve this problem
我厌倦了手动安装枕头表格下载枕头表格githubpython setup.py install
I tired manually installing pillow form downloading pillow form github bypython setup.py install
但无法在 pycharm 上安装我不知道错误是什么整个过程在下面提到:-
but didn't work on installing on pycharm I don't know what the error isthe entire process in mentioned below:-
Collecting Pillow
Using cached https://files.pythonhosted.org/packages/81/1a/6b2971adc1bca55b9a53ed1efa372acff7e8b9913982a396f3fa046efaf8/Pillow-6.0.0.tar.gz
Installing collected packages: Pillow
Running setup.py install for Pillow ... error
Complete output from command C:Users
ijalDesktopwebdevlopsdjango_projectvenvScriptspython.exe -u -c "import setuptools, tokenize;__file__='C:\Users\rijal\AppData\Local\Temp\pip-install-di5is9gd\
Pillow\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:Users
ijalAppDataLocalTemppip-record-zdea
w2p6install-record.txt --single-version-externally-managed --compile --install-headers C:Users
ijalDesktopwebdevlopsdjango_projectvenvincludesitepython3.8Pillow:
C:Users
ijalAppDataLocalTemppip-install-di5is9gdPillowsetup.py:29: RuntimeWarning: Pillow does not yet support Python 3.8 and does not yet provide prebuilt Windows binaries. We do not recommend buildin
g from source on Windows.
warnings.warn(
running install
running build
running build_py
creating build
creating buildlib.win-amd64-3.8
creating buildlib.win-amd64-3.8PIL
copying srcPILBdfFontFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILBlpImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILBmpImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILBufrStubImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILContainerIO.py -> buildlib.win-amd64-3.8PIL
copying srcPILCurImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILDcxImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILDdsImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILEpsImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILExifTags.py -> buildlib.win-amd64-3.8PIL
copying srcPILfeatures.py -> buildlib.win-amd64-3.8PIL
copying srcPILFitsStubImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILFliImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILFontFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILFpxImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILFtexImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILGbrImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILGdImageFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILGifImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILGimpGradientFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILGimpPaletteFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILGribStubImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILHdf5StubImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILIcnsImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILIcoImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILImage.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageChops.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageCms.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageColor.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageDraw.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageDraw2.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageEnhance.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageFilter.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageFont.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageGrab.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageMath.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageMode.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageMorph.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageOps.py -> buildlib.win-amd64-3.8PIL
copying srcPILImagePalette.py -> buildlib.win-amd64-3.8PIL
copying srcPILImagePath.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageQt.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageSequence.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageShow.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageStat.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageTk.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageTransform.py -> buildlib.win-amd64-3.8PIL
copying srcPILImageWin.py -> buildlib.win-amd64-3.8PIL
copying srcPILImImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILImtImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILIptcImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILJpeg2KImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILJpegImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILJpegPresets.py -> buildlib.win-amd64-3.8PIL
copying srcPILMcIdasImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILMicImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILMpegImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILMpoImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILMspImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPaletteFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILPalmImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPcdImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPcfFontFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILPcxImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPdfImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPdfParser.py -> buildlib.win-amd64-3.8PIL
copying srcPILPixarImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPngImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPpmImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPsdImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILPSDraw.py -> buildlib.win-amd64-3.8PIL
copying srcPILPyAccess.py -> buildlib.win-amd64-3.8PIL
copying srcPILSgiImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILSpiderImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILSunImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILTarIO.py -> buildlib.win-amd64-3.8PIL
copying srcPILTgaImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILTiffImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILTiffTags.py -> buildlib.win-amd64-3.8PIL
copying srcPILWalImageFile.py -> buildlib.win-amd64-3.8PIL
copying srcPILWebPImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILWmfImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILXbmImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILXpmImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPILXVThumbImagePlugin.py -> buildlib.win-amd64-3.8PIL
copying srcPIL\_binary.py -> buildlib.win-amd64-3.8PIL
copying srcPIL\_tkinter_finder.py -> buildlib.win-amd64-3.8PIL
copying srcPIL\_util.py -> buildlib.win-amd64-3.8PIL
copying srcPIL\_version.py -> buildlib.win-amd64-3.8PIL
copying srcPIL\__init__.py -> buildlib.win-amd64-3.8PIL
running egg_info
writing srcPillow.egg-infoPKG-INFO
writing dependency_links to srcPillow.egg-infodependency_links.txt
writing top-level names to srcPillow.egg-info op_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'
no previously-included directories found matching 'docs\_static'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.codecov.yml'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'azure-pipelines.yml'
warning: no previously-included files found matching 'tox.ini'
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 '.azure-pipelines'
no previously-included directories found matching '.travis'
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:Users
ijalAppDataLocalTemppip-install-di5is9gdPillowsetup.py", line 759, in <module>
setup(name=NAME,
File "C:Users
ijalDesktopwebdevlopsdjango_projectvenvlibsite-packagessetuptools-40.8.0-py3.8.eggsetuptools\__init__.py", line 145, in setup
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilscore.py", line 148, in setup
dist.run_commands()
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:Users
ijalDesktopwebdevlopsdjango_projectvenvlibsite-packagessetuptools-40.8.0-py3.8.eggsetuptoolscommandinstall.py", line 61, in run
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilscommandinstall.py", line 545, in run
self.run_command('build')
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilscommanduild.py", line 135, in run
self.run_command(cmd_name)
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:Users
ijalAppDataLocalProgramsPythonPython38libdistutilscommanduild_ext.py", line 340, in run
self.build_extensions()
File "C:Users
ijalAppDataLocalTemppip-install-di5is9gdPillowsetup.py", line 606, 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 1, in <module>
File "C:Users
ijalAppDataLocalTemppip-install-di5is9gdPillowsetup.py", line 804, 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
----------------------------------------
Command "C:Users
ijalDesktopwebdevlopsdjango_projectvenvScriptspython.exe -u -c "import setuptools, tokenize;__file__='C:\Users\rijal\AppData\Local\Temp\pip-install-di5is9gd\Pillow\setup.py';f=geta
ttr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:Users
ijalAppDataLocalTemppip-record-zdeaw2p6install-record.txt
--single-version-externally-managed --compile --install-headers C:Users
ijalDesktopwebdevlopsdjango_projectvenvincludesitepython3.8Pillow" failed with error code 1 in C:Users
ijalAppDataLocalTemppi
p-install-di5is9gdPillow
推荐答案
Pillow 6.2.0 现在支持 Python 3.8 并提供预建轮子.
Pillow 6.2.0 now supports Python 3.8 and has prebuilt wheels available.
确保您使用 Python 3.8.0 final 或更高版本以及 pip 19.2 或更高版本.
Make sure you're using Python 3.8.0 final or later with pip 19.2 or later.
升级:
python -m pip install --upgrade pip
python -m pip install --upgrade pillow
选择 python -m pip install
而不是 pip install
的原因:
这篇关于如何修复“枕头上的 pip 安装错误"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!