Python 无法使用 pip install requirements.txt 进行安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42876592/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to install using pip install requirements.txt
提问by Avdhesh Parashar
I'm trying to install BitTornadofor Python 2.7 using requirements.txt, I get the following error:
我正在尝试使用 requirements.txt 为 Python 2.7安装BitTornado,但出现以下错误:
Collecting requirements.txt
Could not find a version that satisfies the requirement requirements.txt (from versions: )
No matching distribution found for requirements.txt
Here is my code in requirements.txt:
这是我在requirements.txt中的代码:
-e git+https://github.com/effigies/BitTornado.git#egg=python2.7
I also tried -e git+https://github.com/effigies/[email protected]but still not working. Does someone know why is this happening?
我也试过 -e git+ https://github.com/effigies/[email protected]但仍然无法正常工作。有人知道为什么会这样吗?
Note: "python2.7" is the branch name
注意:“python2.7”是分支名称
Thanks in Advance
提前致谢
回答by jwodder
The correct command is pip install -r requirements.txt
. Note the -r
option; without it, pip thinks you want to install a package named requirements.txt
, which doesn't exist.
正确的命令是pip install -r requirements.txt
. 注意-r
选项;没有它,pip 会认为您要安装一个名为 的包requirements.txt
,但该包不存在。
回答by mic4ael
You forgot to add -r
switch to specify that requirements.txt
is the file with your dependencies.
您忘记添加-r
开关以指定requirements.txt
具有依赖项的文件。