Python 在Pip需求文件(例如从Git url)中使用符号和的语法是什么?
在requirements.txt中使用Python 在Pip需求文件(例如从Git url)中使用符号和的语法是什么?,python,git,pip,requirements.txt,Python,Git,Pip,Requirements.txt,在requirements.txt中使用&的正确语法是什么?有逃跑的顺序吗 我在Git repo的子目录中有一个Python包。我可以使用pip成功安装该软件包(此处的语法:) 但是,如果将Git URL放入requirements.txt文件中,则无法安装。我相信它在URL中的符号和字符上出现了中断(&subdirectory=blah) 引号在需求文件中不起作用。用反斜杠和carot转义符号和也不起作用(\&或^&) 更新 我使用requirements.txt中的-e语法实现了它(不需要
&
的正确语法是什么?有逃跑的顺序吗
我在Git repo的子目录中有一个Python包。我可以使用pip成功安装该软件包(此处的语法:)
但是,如果将Git URL放入requirements.txt文件中,则无法安装。我相信它在URL中的符号和字符上出现了中断(&subdirectory=blah)
引号在需求文件中不起作用。用反斜杠和carot转义符号和也不起作用(\&
或^&
)
更新
- 我使用requirements.txt中的
语法实现了它(不需要引号)。如果没有-e
,这可能吗-e
$ pip install 'git+ssh://git@github.example.com/reponame.git@branchname#egg=packagename&subdirectory=one/two'
[OK]
$ cat requirements.txt
"git+ssh://git@github.example.com/reponame.git@branchname#egg=pac..."
$ pip install -r requirements.txt
RequirementParseError: Missing distribution spec "git+ssh://git@github.example.com/reponame.git@branchname#egg=packagename&subdirectory=one/two"