获得了一个 requirements.txt 文件,该文件可能是 pip冻结的结果。该文件包含多个版本号错误的引用,例如:
Collecting python-apt==1.6.2 (from -r requirements.txt (line 183))
Could not find a version that satisfies the requirement python-apt==1.6.2 (from -r requirements.txt (line 183)) (from versions: 0.0.0, 0.7.8)
No matching distribution found for python-apt==1.6.2 (from -r requirements.txt (line 183))
另一个例子:
Collecting pygobject==3.26.1 (from -r requirements.txt (line 170))
Could not find a version that satisfies the requirement pygobject==3.26.1 (from -r requirements.txt (line 170)) (from versions: 3.27.0, 3.27.1, 3.27.2, 3.27.3, 3.27.4, 3.27.5, 3.28.0, 3.28.1, 3.28.2, 3.28.3, 3.29.1.dev0, 3.29.2.dev0, 3.29.3.dev0, 3.30.0)
No matching distribution found for pygobject==3.26.1 (from -r requirements.txt (line 170))
此外,还有对Ubuntu软件包的引用,例如:
Collecting pdfshuffler==0.6.0 (from -r requirements.txt (line 144))
Could not find a version that satisfies the requirement pdfshuffler==0.6.0 (from -r requirements.txt (line 144)) (from versions: )
No matching distribution found for pdfshuffler==0.6.0 (from -r requirements.txt (line 144))
有两个问题:
1)如何从 pip冻结中获得这样的结果?
2)进行修复的最佳方法是什么?手动修复 requirements.txt 吗?还是其他?
谢谢。
答案 0 :(得分:0)
的结果
requirements.txt
,应该是pip freeze
好吧,如果您不知道文件的来源和来源,我们怎么知道?
1)从点子冻结中如何得到这样的结果?
可能有人手动编辑了它。
2)进行修复的最佳方法是什么?手动修复requirements.txt吗?还是其他?
是的,请手动修复。