Windows 10 系统下解决 “Could not build wheels for pillow“

  1. 安装 Visual C++ Build Tools:

访问 Visual Studio 下载页面,选择下载适用于你的操作系统的版本,并运行安装程序。

复制代码
https://visualstudio.microsoft.com/zh-hans/vs/

在 Visual Studio 安装程序中选择 "使用 C++ 的桌面开发" 工作负载,并确保勾选了相关的组件,

  • "Windows 10 SDK"
  • "MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.29)"

完成安装后,打开 "x64 Native Tools Command Prompt for VS 2019" 或 "x86 Native Tools Command Prompt for VS 2019",该命令提示符会自动设置正确的环境变量。


  1. 安装pillow:

    pip install pillow==8.4.0 -i https://mirrors.aliyun.com/pypi/simple/

如果成功了就不需要第三步了, over


  1. 设置环境变量:

打开命令提示符,并在其中输入以下命令,以设置 INCLUDE 环境变量:

shell 复制代码
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\winrt;

继续在命令提示符中输入以下命令,设置 LIB 环境变量:

shell 复制代码
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\lib\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86;

完成

相关推荐
陈葛杰1 天前
Axure RP 10.0安装教程(傻瓜版)
windows·开源软件·axure
我命由我123451 天前
Windows 操作系统 - Windows 查看架构类型
运维·windows·笔记·学习·系统架构·运维开发·系统
Byron Loong1 天前
【逆向】Windows 三大注入:远程线程 、APC 、 钩子注入
windows
凤舞飘伶1 天前
windows安装docker-desk
windows·docker·容器
绿豆人1 天前
Cache缓存项目学习4
windows·学习·缓存
LuDvei1 天前
Windows x86 架构下 Ubuntu 虚拟机内打包 Qt 文件指南
windows·qt·ubuntu
数据法师1 天前
Wise Force Deleter:专门解决Windows文件“无法删除”问题的免费工具
windows
学习中.........1 天前
Windows 上用 cc-connect 接入 Telegram + Codex:从零跑通与避坑指南
windows
铁手飞鹰1 天前
PyModbus API对应的功能码和报文
linux·windows·python·modbus rtu·pymodbus
idolao1 天前
helium_0.11.5.1_x64-installer浏览器安装步骤详解(附Helium浏览器配置与隐私设置)
windows