Requirements.txt file failing with a Git repo source

I have this requirements file:

requests==2.24.0
-e git+ssh://[email protected]/path/to/mygit.git#egg=mymodule

Ad when I pip install -r requirements.txt -t some/folder, I get:

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

When I go the long route and bring the repo down and pip install -e . -t some/folder, I get the same error. But when I pip install . -t some/folder, no errors. Any idea how to make this work with requirements.txt?

Answer

This should not be anything more than a python bug . A possible solution to the problem would be removing the -t from your pip install -r requirements.txt -t some/folder .

The problem has occurred before and a little search on the internet would take you here.

Edit: The answer to this was removing -e from requirements.txt.