小编Kyu*_*jin的帖子

“无法找到 zlib 的头文件或库文件,这是从源代码编译 Pillow 时所需的依赖项”

我正在尝试使用 pyautogui 运行 Python 程序,但出现问题,因为它告诉我 Pillow 尚未安装。我尝试使用以下命令安装或升级它

\n
pip install Pillow --upgrade \n
Run Code Online (Sandbox Code Playgroud)\n

但没有任何效果。

\n

在文档中,他们说 Pillow 不能与 PIL 共存,因此我们需要卸载它,但我不能,因为它说它尚未安装。

\n

错误是:

\n
The headers or library files could not be found for zlib,\n      a required dependency when compiling Pillow from source.\n
Run Code Online (Sandbox Code Playgroud)\n

并且

\n
Collecting Pillow\n  Using cached Pillow-9.2.0.tar.gz (50.0 MB)\n  Preparing metadata (setup.py) ... done\nBuilding wheels for collected packages: Pillow\n  Building wheel for Pillow (setup.py) ... error\n  error: subprocess-exited-with-error\n\n  \xc3\x97 python setup.py bdist_wheel did not run successfully.\n …
Run Code Online (Sandbox Code Playgroud)

python pip python-imaging-library pyautogui

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

pip ×1

pyautogui ×1

python ×1

python-imaging-library ×1