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
ERROR: Could not build wheels for Pillow, which is required to install pyproject.toml-based projects
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
ERROR: Could not build wheels for Pillow, which is required to install pyproject.toml-based projects
解决办法如下:
解决方法一:在官网下载安装包,通过cmd窗口
$ pip install Pillow-10.0.0-pp310-pypy310_pp73-win_amd64.whl
$ pip install 安装包文件.whl命令安装
解决方法二:更换下载源
考虑指定下载源并信任其来源或许能下载成功,这里使用 豆瓣下载源,也可尝试其它下载源。
pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
3.解决方法三:也有可能是包版本版本号与Python解释器不一致,这种情况可以使用pip install 包名 --pre安装预发版。
pip install pillow --pre
eg:
比如我的pillow最新版为3.1.0,暂未发布新版版本,我的Python解释器为Python3.1.1
,这里我使用pip install pillow --pre安装预发版就成功了