这个问题在这里已经有了答案:
pip install PIL fails
(5 个回答)
4年前关闭。
我尝试安装 PIL 但出现错误,我该怎么办?
$ Command
Result
------------
$ pip install PIL
Collecting PIL
Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
--------------------------------------------------------------------
$ pip install PIL --allow-unverified PIL --allow-all-external
DEPRECATION: --allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Collecting PIL
Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
最佳答案
您可以尝试使用 Pillow 代替,这是一个 PIL 叉:
pip install Pillow
导入使用:
from PIL import Image
关于python - 尝试安装 PIL 时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41326387/