mac os 使用 from scipy.misc import imread ImportError: cannot import name 'imread'
mac os 使用 from scipy.misc import imread ImportError: cannot import name 'imread'
问题1:
我原先安装了 pillow 仍然会报错,我看了一下 pillow 的版本,默认安装 Pillow==6.0.0
这个版本的 scipy.misc
里面没有 imread
。
pip3 install Pillow==4.3.0
问题2:
安装Pillow==4.3.0错误:
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting Pillow==3.3.1
Downloading https://mirrors.aliyun.com/pypi/packages/7b/32/e6978aed8fba6398c00eec25f12798fb57647a6cef4f85db1567e3d086ef/Pillow-3.3.1.tar.gz (10.6MB)
|████████████████████████████████| 10.6MB 7.5MB/s
Building wheels for collected packages: Pillow
Building wheel for Pillow (setup.py) ... error
ERROR: Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/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/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-wheel-37mrjey0 --python-tag cp37:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MpoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageMode.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PngImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/XbmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/SunImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/SpiderImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TarIO.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/BdfFontFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageStat.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PixarImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GimpPaletteFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageColor.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ContainerIO.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MspImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MicImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImtImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GifImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PalmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageQt.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageMath.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PaletteFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FontFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ExifTags.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageCms.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FpxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageChops.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PSDraw.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PcdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageFilter.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageDraw2.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImagePath.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/DcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/JpegPresets.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/features.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageDraw.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GimpGradientFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageWin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/IcoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/_tkinter_finder.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/EpsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TgaImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageMorph.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/WalImageFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PcfFontFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageTk.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GbrImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageOps.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PdfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageShow.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageEnhance.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/WmfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageGrab.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/WebPImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FliImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TiffTags.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/CurImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/_util.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GdImageFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TiffImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/IptcImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImagePalette.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/BmpImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageTransform.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/IcnsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/McIdasImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/XpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/OleFileIO.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/DdsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageSequence.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PyAccess.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/_binary.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/Image.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/SgiImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PsdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/JpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageFont.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FtexImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
running egg_info
writing Pillow.egg-info/PKG-INFO
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing top-level names to Pillow.egg-info/top_level.txt
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
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
writing manifest file 'Pillow.egg-info/SOURCES.txt'
copying PIL/OleFileIO-README.md -> build/lib.macosx-10.9-x86_64-3.7/PIL
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/setup.py", line 753, in <module>
zip_safe=not debug_build(), )
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 192, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/setup.py", line 521, in build_extensions
' using --disable-%s, aborting' % (f, f))
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
----------------------------------------
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: Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/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/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-record-l9wo3iyw/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MpoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageMode.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PngImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/XbmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/SunImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/SpiderImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TarIO.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/BdfFontFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageStat.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PixarImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GimpPaletteFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageColor.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ContainerIO.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MspImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/MicImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImtImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GifImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PalmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageQt.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageMath.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PaletteFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FontFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ExifTags.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageCms.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FpxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageChops.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PSDraw.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PcdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageFilter.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageDraw2.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImagePath.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/DcxImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/JpegPresets.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/features.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageDraw.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GimpGradientFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageWin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/IcoImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/_tkinter_finder.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/EpsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TgaImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageMorph.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/WalImageFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PcfFontFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageTk.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GbrImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageOps.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PdfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageShow.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageEnhance.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/WmfImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageGrab.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/WebPImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FliImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TiffTags.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/CurImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/_util.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/GdImageFile.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/TiffImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/IptcImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImagePalette.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/BmpImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageTransform.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/IcnsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/McIdasImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/XpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/OleFileIO.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/DdsImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageSequence.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PyAccess.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/_binary.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/Image.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/SgiImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PsdImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/JpegImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/ImageFont.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/PpmImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
copying PIL/FtexImagePlugin.py -> build/lib.macosx-10.9-x86_64-3.7/PIL
running egg_info
writing Pillow.egg-info/PKG-INFO
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing top-level names to Pillow.egg-info/top_level.txt
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
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
writing manifest file 'Pillow.egg-info/SOURCES.txt'
copying PIL/OleFileIO-README.md -> build/lib.macosx-10.9-x86_64-3.7/PIL
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/setup.py", line 753, in <module>
zip_safe=not debug_build(), )
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/setup.py", line 521, in build_extensions
' using --disable-%s, aborting' % (f, f))
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
----------------------------------------
ERROR: Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/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/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-record-l9wo3iyw/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/
最后一行红色是重点:
Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/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/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-record-l9wo3iyw/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/zy/fjrb7rqn1vd88h7fs111k3j00000gn/T/pip-install-6rx_ulqm/Pillow/
原因及解决办法:
###### 解决办法:
###### 这是因为缺少openjpeg这个库的问题,可以使用安装:
> brew install openjpeg
> pip3 install Pillow==5.2.0
问题3:发现还是没有 cannot import name 'imread'
解决:
3.1查看pillow和scipy安装目录是否一致,不一致卸载
sudo pip3 install pillow
sudo pip install scipy
3.2 重新安装
sudo pip install scipy==1.1.0
sudo pip3 install pillow==5.2.0
3.3测试
python3 -c "from scipy.misc import imread "
mac os 使用 from scipy.misc import imread ImportError: cannot import name 'imread'的更多相关文章
- ubuntu16 升级pip3后报错File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'
问题:ubuntu16 执行pip3 install --upgrade pip之后,pip3执行出错. Traceback (most recent call last): File "/ ...
- 输入pip命令报错:from pip import main ImportError: cannot import name 'main'
报错信息: qly@qlyComputer:~$ pip Traceback (most recent call last): File "/usr/bin/pip", line ...
- Python 解决: from pip import main ImportError: cannot import name 'main'
此次报错是因为 pip 升级出的问题: from pip import mainif __name__ == '__main__': sys.exit(main()) 改为: from pip imp ...
- 执行sudo pip3 ...报错 Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'
对于普通pip,把pip3改成pip即可,其他的修改一样 1.执行命令 sudo gedit /usr/bin/pip3 2.改成下面的形式 from pip import __main__ # 需要 ...
- ImportError: cannot import name 'check_arrays'
from sklearn.utils.validation import check_arrays 执行 from sklearn.utils.validation import check_arra ...
- python import eventlet包时提示ImportError: cannot import name eventlet
root@zte-desktop:/home/ubuntu/python-threads# cat eventlet.py #!/usr/bin python import eventlet from ...
- Ubuntu|ython3 :ImportError: cannot import name 'main'
1.问题 root@stephen-K55VD:/usr/bin# pip3 Traceback (most recent call last): File "/usr/bin/pip3&q ...
- ImportError: cannot import name UnrewindableBodyError
错误信息: File "/usr/lib/python2.7/site-packages/urllib3/util/__init__.py", line 4, in <mod ...
- pip3更新后install package出现ImportError: cannot import name 'main'
linux下pip3更新后,install包出现main不能导入的情况: bear@bear:~/eclipse-workspace/Python-toolbox$ pip3 install pycr ...
随机推荐
- ocelot性能测试
网上搜索发现多篇文章指出ocelot的性能有问题,可是在ocelot项目issue提问中,维护者指出,ocelot的性能问题不大.瓶颈在于.net的httpclient. 我参考文章 https:// ...
- kali渗透综合靶机(九)--Typhoon靶机
kali渗透综合靶机(九)--Typhoon靶机 靶机下载地址:https://www.vulnhub.com/entry/typhoon-102,267/ 一.主机发现 1.netdiscover ...
- dubbo(提供者、消费者)基于java的实现
1.安装好jdk.zookeeper以后可以尝试开发代码进行dubbo的学习和练习. 首先创建Dubbo的Provider配置.创建一个maven project工程. RPC框架,不希望Consum ...
- Filco圣手二代双模蓝牙机械键盘连接方法
转自:https://www.cnblogs.com/goldenSky/p/11437780.html 常规方法 确认键盘的电源接通. 同时按下「Ctrl」+「Alt」+「Fn」执行装置切换模式.配 ...
- maven工程运行前准备
近一年来,我学习了很多java及数据库前沿技术,如Spring框架,SpringMVC框架,Mybatis框架,Redis,Dubbo,Maven等. 以及一些Linux命令和在Linux环境下的工程 ...
- Linux软件安装——软件包
Linux软件安装——软件包 摘要:本文主要学习了Linux下软件安装的相关知识. 软件包 简介 Linux下的软件包众多,且几乎都是经GPL授权.免费开源(无偿公开源代码)的.这意味着如果你具备修改 ...
- https://www.cnblogs.com/kxm87/p/9268622.html
数据库使用MySQL,ORM使用spring data jpa 1 因此需要再pom.xml文件中添加相应jar包.如下: <!-- 引入jap --> <dependency> ...
- CTF必备技能丨Linux Pwn入门教程——ROP技术(上)
Linux Pwn入门教程系列分享如约而至,本套课程是作者依据i春秋Pwn入门课程中的技术分类,并结合近几年赛事中出现的题目和文章整理出一份相对完整的Linux Pwn教程. 教程仅针对i386/am ...
- 图解Java数据结构之环形链表
本篇文章介绍数据结构中的环形链表. 介绍 环形链表,类似于单链表,也是一种链式存储结构,环形链表由单链表演化过来.单链表的最后一个结点的链域指向NULL,而环形链表的建立,不要专门的头结点,让最后一个 ...
- 统计代码测试覆盖率-Python
衡量Unit Test(单元测试)是否充分, 覆盖率是一个必要指标, 是检验单元测试的重要依据, 这里针对python unittest 的单元测试覆盖率coverage进行分享. 来自官方的解释: ...