gpt4 book ai didi

python - 找不到满足选择要求的版本

转载 作者:行者123 更新时间:2023-12-01 07:57:12 25 4
gpt4 key购买 nike

我目前正在尝试安装一个需求,它告诉我当我尝试将其注释掉时找不到它,而其他人也会发生这种情况。

我刚刚部署了 Ubuntu 18.04 服务器。通过以下命令创建虚拟环境 python3 -m venv --system-site-packages env 但每次我尝试运行 pip install -rrequirements.txt 它失败并显示

Collecting apparmor==2.12 (from -r requirements.txt (line 1))
Could not find a version that satisfies the requirement apparmor==2.12 (from -r requirements.txt (line 1)) (from versions: )
No matching distribution found for apparmor==2.12 (from -r requirements.txt (line 1))

如果我尝试安装pip install apparmor它会告诉我

Collecting apparmor
Could not find a version that satisfies the requirement apparmor (from versions: )
No matching distribution found for apparmor

但是如果我注释掉 apparmor 它会告诉我这一 pip

Collecting apturl==0.5.2 (from -r requirements.txt (line 2))
Could not find a version that satisfies the requirement apturl==0.5.2 (from -r requirements.txt (line 2)) (from versions: )
No matching distribution found for apturl==0.5.2 (from -r requirements.txt (line 2))

其他人也会随机发生。这些要求是在我的本地(也是 ubuntu 18)上提出的,因此不确定为什么这适用于本地但不适用于新部署。

我还确保它是最新版本的 pip

最佳答案

apparmorapturl 是 Ubuntu 软件包,如果您的代码不使用它们的代码,您可以安全地忽略它们;只需从 requirements.txt 中删除它们即可。如果您的代码依赖于它们,请确保它们是通过 apt 安装的:

apt install -y apparmor apturl && pip install -r requirements.txt

关于python - 找不到满足选择要求的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55910971/

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