gpt4 book ai didi

django - Heroku:未找到 PIL==1.1.7 的匹配分布

转载 作者:行者123 更新时间:2023-12-04 18:01:08 24 4
gpt4 key购买 nike

我正在尝试推送我的 Heroku 应用程序,但在服务器上安装 PIL 时出现错误,我已尝试通过调整我的 requirements.txt 如下所示

Django==1.4.5
Fabric==1.4.3
--allow-all-external
--allow-unverified PIL
PIL==1.1.7
#Pillow==2.3.0

还尝试在 requirements.txt 的开头添加参数,如下所示:

--allow-all-external
--allow-unverified PIL
Django==1.4.5
Fabric==1.4.3
PIL==1.1.7
#Pillow==2.3.0

这是失败的错误:

remote:   InsecurePlatformWarning
remote: Downloading Django-1.4.5.tar.gz (7.7MB)
remote: Collecting Fabric==1.4.3 (from -r requirements.txt (line 2))
remote: Downloading Fabric-1.4.3.tar.gz (221kB)
remote: Collecting PIL==1.1.7 (from -r requirements.txt (line 5))
remote: Could not find a version that satisfies the requirement PIL==1.1.7 (
om -r requirements.txt (line 5)) (from versions: )
remote: No matching distribution found for PIL==1.1.7 (from -r requirements.tx
(line 5))
remote:
remote:
remote: ! Push rejected, failed to compile Python app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to my-test-app.
remote:

最佳答案

使用Pillow而不是 PIL。 PIL自 2009 年以来没有维护并且没有新版本。Pillow 是一个维护的 fork 。

关于django - Heroku:未找到 PIL==1.1.7 的匹配分布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35198987/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com