尝试将 PIL 安装到我的 pyCharm 项目时出现以下错误:
ERROR: Could not find a version that satisfies the requirement PIL (from versions: none)
ERROR: No matching distribution found for PIL
WARNING: You are using pip version 21.3.1; however, version 23.1.2 is available.
You should consider upgrading via the 'C:\Users\fooBar\PycharmProjects\pythonProject8\venv\Scripts\python.exe -m pip install --upgrade pip' command.
当我这样做时,shell 输出是
Requirement already satisfied: pip in c:\users\fooBar\anaconda3\lib\site-packages (23.1.2)
但是 PIL 安装出现相同的错误,所以我尝试删除 pyCharm 中的 pip (21.3.1) 并重新安装,成功安装了 pip 23.1.2。但是当我重试 PIL 安装时,我得到了这个错误
ERROR: Could not find a version that satisfies the requirement PIL (from versions: none)
ERROR: No matching distribution found for PIL
包裹
PIL
不再存在。
需要安装包
pillow
,原来是PIL
的fork.
需要做
pip install pillow
,或者直接通过IDE安装到正确的venv中。这仍然会给你 python 模块PIL