Requirements.txt文件因Git repo源而失败



我有这个需求文件:

requests==2.24.0
-e git+ssh://git@omyurl/path/to/mygit.git#egg=mymodule

广告当我pip install -r requirements.txt -t some/folder,我得到:

ERROR: Command errored out with exit status 1:
command: /../.pyenv/versions/3.7.5/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/../src/mymodule/setup.py'"'"'; __file__='"'"'/../src/mymodule/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --home=/private/var/folders/14/xyz/T/pip-target-9ag4c8zg
cwd: /../src/mymodule/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: option --home not recognized

当我走长路线,降低回购和pip install -e . -t some/folder时,我会得到同样的错误。但当我pip install . -t some/folder时,没有错误。你知道如何使用requirements.txt吗?

这不应该只是一个python错误。这个问题的一个可能的解决方案是从pip install -r requirements.txt -t some/folder中删除-t

这个问题以前也发生过,在互联网上搜索一下就会把你带到这里。

编辑:答案是从requirements.txt中删除-e

最新更新