Kyu*_*jin 8 python pip python-imaging-library pyautogui
我正在尝试使用 pyautogui 运行 Python 程序,但出现问题,因为它告诉我 Pillow 尚未安装。我尝试使用以下命令安装或升级它
\npip install Pillow --upgrade \n
Run Code Online (Sandbox Code Playgroud)\n但没有任何效果。
\n在文档中,他们说 Pillow 不能与 PIL 共存,因此我们需要卸载它,但我不能,因为它说它尚未安装。
\n错误是:
\nThe 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并且
\nCollecting 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)\n
小智 -3
如果你是linux用户你可以这样做
pip install pillow
Run Code Online (Sandbox Code Playgroud)
或者
sudo apt install python3-pil
Run Code Online (Sandbox Code Playgroud)