开发环境:windows10、Python3.6
报错经历:
1、 error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
不建议安装,大小4G左右
2、安装了vc++ 14.0 仍会报错:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
解决办法:下载.whl文件解决
第一,前往https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow 下载与python版本相符的pillow文件,如python 3.6.5 下载Pillow-5.3.0-cp36-cp36m-win_amd64.whl(查看python版本:cmd->python)
第二:进入到anaconda安装目录的Scripts文件夹中.比如:D:\software\anaconda\anaconda\Scripts\Pillow-5.3.0-cp36-cp36m-win_amd64.whl 。使用pip安装刚刚下载好的whl文件,pip.exe install *.whl,例如:(此处的--user 看权限)