如何在 requirements.txt 中允许未经验证的包

How to allow unverified packages in requirements.txt

我在服务器上安装 ahocorasick 时遇到以下错误:

忽略了一些不安全和无法验证的文件(使用 --allow-unverified ahocorasick 允许)。

如何修改 requirements.txt 以允许未验证的包? Fresh deploy on Heroku fails with "use --allow-unverified PIL to allow" 中的答案表明我们可以在 requirements.txt 中添加 --allow-unverified ahocorasick。但这对我不起作用。

您还需要在 requirements.txt

的顶部添加这一行
--allow-all-external

然后在所需的包中使用 --allow-unverified