苹果Macbook Pro13 M1芯片安装Pillow的方法步骤
正确的安装
1、先安装packaging
python3 -m pip install packaging
执行这个命令后会提示这样安装成功
defaulting to user installation because normal site-packages is not writeable
collecting packaging
downloading packaging-20.8-py2.py3-none-any.whl (39 kb)
collecting pyparsing>=2.0.2
downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kb)
|████████████████████████████████| 67 kb 42 kb/s
installing collected packages: pyparsing, packaging
successfully installed packaging-20.8 pyparsing-2.4.
2、执行下面这个命令,查看命令输出的是什么,输出的名字等下会用到
python3 -c"from packaging import tags; print('\n'.join([str(t) for t in tags.sys_tags()]))" |head -5
我的输出是:
cp38-cp38-macosx_11_0_arm64
cp38-cp38-macosx_11_0_universal2
cp38-abi3-macosx_11_0_arm64
cp38-abi3-macosx_11_0_universal2
cp38-none-macosx_11_0_arm64
3、在这里下载pillow安装包https://pypi.org/project/pillow/8.0.1/#files
请下载mac版的,并且与你电脑python版本一样的包,默认是3.8的,就是:pillow-8.0.1-cp38-cp38-macosx_10_10_x86_64.whl
这个下载完成以后,命令行进入下载目录重命名,因为我上一个命令输出的有cp38-cp38-macosx_11_0_universal2,所以重命名的时候要在这个前面加上下载回来文件的pillow-8.0.1-
请注意如果不重命名是安装不成功的,会提示
error: pillow-8.0.1-cp38-cp38-macosx_11_0_x86_64.whl is not a supported wheel on this platform.
4、重命名
mv pillow-8.0.1-cp38-cp38-macosx_11_0_x86_64.whl pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl
5、安装
python3 -m pip install pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl
安装成功,输出
defaulting to user installation because normal site-packages is not writeable
processing ./pillow-8.0.1-cp38-cp38-macosx_11_0_universal2.whl
installing collected packages: pillow
successfully installed pillow-8.0.1
错误的安装
官网中是先升级pip到最新版本,然后安装pillow的,但是这样是错误的
python3 -m pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com --user
python3 -m pip install --upgrade pillow -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com --user
这样安装以后会报下面的错误
error: command errored out with exit status 1: command: /applications/xcode.app/contents/developer/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py'"'"'; __file__='"'"'/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-wheel-h8rcl21r cwd: /private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/ complete output (172 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.14.6-arm64-3.8 creating build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mpoimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagemode.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pngimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/xbmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pcximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/sunimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/spiderimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tario.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fitsstubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mpegimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/bdffontfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gribstubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagestat.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pixarimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gimppalettefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagecolor.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/containerio.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mspimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/micimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_version.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imtimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gifimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/palmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageqt.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagemath.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/palettefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fontfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pdfparser.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/exiftags.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagecms.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fpximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagechops.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/bufrstubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/psdraw.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pcdimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagefilter.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagedraw2.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagepath.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/dcximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/jpegpresets.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/hdf5stubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/features.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagedraw.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gimpgradientfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagewin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/icoimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_tkinter_finder.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/epsimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tgaimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagemorph.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/jpeg2kimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/walimagefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pcffontfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/blpimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagetk.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gbrimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageops.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pdfimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageshow.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageenhance.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/wmfimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagegrab.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/webpimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fliimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tifftags.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/curimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_util.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gdimagefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tiffimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/iptcimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagepalette.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/bmpimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagetransform.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/icnsimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mcidasimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/xpmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/ddsimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagesequence.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pyaccess.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_binary.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/image.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/__main__.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/xvthumbimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/sgiimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/psdimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/jpegimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagefont.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/ppmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fteximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil running egg_info writing src/pillow.egg-info/pkg-info writing dependency_links to src/pillow.egg-info/dependency_links.txt writing top-level names to src/pillow.egg-info/top_level.txt reading manifest file 'src/pillow.egg-info/sources.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' writing manifest file 'src/pillow.egg-info/sources.txt' running build_ext the headers or library files could not be found for jpeg, 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 "/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py", line 861, in <module> setup( file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 192, in run self.run_command('build') file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run self.build_extensions() file "/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py", line 698, in build_extensions raise requireddependencyexception(f) __main__.requireddependencyexception: jpeg during handling of the above exception, another exception occurred: traceback (most recent call last): file "<string>", line 1, in <module> file "/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py", line 914, in <module> raise requireddependencyexception(msg) __main__.requireddependencyexception: the headers or library files could not be found for jpeg, a required dependency when compiling pillow from source. please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation.html ---------------------------------------- error: failed building wheel for pillow running setup.py clean for pillow failed to build pillow installing collected packages: pillow running setup.py install for pillow ... error error: command errored out with exit status 1: command: /applications/xcode.app/contents/developer/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py'"'"'; __file__='"'"'/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-record-t6q8624y/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /users/jia611/library/python/3.8/include/python3.8/pillow cwd: /private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/ complete output (174 lines): running install running build running build_py creating build creating build/lib.macosx-10.14.6-arm64-3.8 creating build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mpoimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagemode.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pngimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/xbmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pcximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/sunimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/spiderimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tario.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fitsstubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mpegimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/bdffontfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gribstubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagestat.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pixarimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gimppalettefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagecolor.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/containerio.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mspimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/micimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_version.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imtimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gifimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/palmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageqt.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagemath.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/palettefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fontfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pdfparser.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/exiftags.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagecms.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fpximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagechops.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/bufrstubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/psdraw.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pcdimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagefilter.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagedraw2.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagepath.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/dcximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/jpegpresets.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/hdf5stubimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/features.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagedraw.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gimpgradientfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagewin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/icoimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_tkinter_finder.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/epsimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tgaimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagemorph.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/jpeg2kimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/walimagefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pcffontfile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/blpimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagetk.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gbrimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageops.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pdfimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageshow.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imageenhance.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/wmfimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagegrab.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/webpimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fliimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tifftags.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/curimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_util.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/gdimagefile.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/tiffimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/iptcimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagepalette.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/bmpimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagetransform.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/icnsimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/mcidasimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/xpmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/ddsimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagesequence.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/pyaccess.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/_binary.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/image.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/__main__.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/xvthumbimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/sgiimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/psdimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/jpegimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/imagefont.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/ppmimageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil copying src/pil/fteximageplugin.py -> build/lib.macosx-10.14.6-arm64-3.8/pil running egg_info writing src/pillow.egg-info/pkg-info writing dependency_links to src/pillow.egg-info/dependency_links.txt writing top-level names to src/pillow.egg-info/top_level.txt reading manifest file 'src/pillow.egg-info/sources.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' writing manifest file 'src/pillow.egg-info/sources.txt' running build_ext the headers or library files could not be found for jpeg, 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 "/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py", line 861, in <module> setup( file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/command/install.py", line 561, in run self.run_command('build') file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) file "/applications/xcode.app/contents/developer/library/frameworks/python3.framework/versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run self.build_extensions() file "/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py", line 698, in build_extensions raise requireddependencyexception(f) __main__.requireddependencyexception: jpeg during handling of the above exception, another exception occurred: traceback (most recent call last): file "<string>", line 1, in <module> file "/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py", line 914, in <module> raise requireddependencyexception(msg) __main__.requireddependencyexception: the headers or library files could not be found for jpeg, a required dependency when compiling pillow from source. please see the install instructions at: https://pillow.readthedocs.io/en/latest/installation.html ---------------------------------------- error: command errored out with exit status 1: /applications/xcode.app/contents/developer/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py'"'"'; __file__='"'"'/private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-install-okf0dho1/pillow_76b996deb26b49e88d010da5d5313737/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/9d/y_278jdd5ws7s8pf0_ds7cs40000gn/t/pip-record-t6q8624y/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /users/lizhensheng/library/python/3.8/include/python3.8/pillow check the logs for full command output.
到此这篇关于苹果macbook pro13 m1芯片安装pillow的方法步骤的文章就介绍到这了,更多相关m1芯片安装pillow内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!