我与它具有以下结构的回购工作:如何安装包含git的包,如果它有多个子目录?
- 富/酒吧/ setup.py
- 富/酒吧/ mypackage的
我试图安装使用的东西这个包如:
pip install git+ssh://[email protected]/owner/[email protected]#egg=mypackage&subdirectory=foo/bar
但是,它只是挂在这里,似乎没有回应。
他们的documentation没有这样的多重嵌套目录包路径的例子。然而它确实说,重点是我的:
对于setup.py不在项目根目录中的项目,使用“子目录”组件。 值“子目录”部分应该是从项目到setup.py位于
是什么从PIP的正确安装形成一个多目录看起来像根开始的一条路径?
以上是返回错误,例如:
Could not find a tag or branch 'commit', assuming commit.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/var/folders/wf/89r2567s5hv48lj1g9l65mbw0000gp/T/pip-gAwA3W-build/setup.py'
我看到这一点使用我测试PIP(9.0.1和8.1.1)的所有版本。
下面是详细的日志:
$ pip install git+ssh://[email protected]/user/[email protected]#egg=projectname&subdirectory=lib/python
[1] 4195
Collecting projectname from git+ssh://[email protected]/user/[email protected]#egg=projectname
Cloning ssh://[email protected]/user/repo.git (to 8d109c760ae8a9599299924be1b78645e2617a50) to /private/var/folders/wf/89r2567s5hv48lj1g9l65mbw0000gp/T/pip-build-w01D4G/repo
Could not find a tag or branch 'hash', assuming commit.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/private/var/folders/wf/89r2567s5hv48lj1g9l65mbw0000gp/T/pip-build-w01D4G/repo/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/wf/89r2567s5hv48lj1g9l65mbw0000gp/T/pip-build-w01D4G/repo/
[1]+ Exit 1 pip install git+ssh://[email protected]/user/[email protected]#egg=projectname
它看起来像最初subdirectory
行,我把它叫做后,画中画命令的那部分正在消失?
只是注意到在蛋之前没有@(因为它应该是'pip install git + ssh:// git @ github.com/owner/repo-namegit @ commithash#egg = mypackage&subdirectory = foo/bar'而不是'pip install git + ssh://[email protected]/owner/[email protected]#@egg=mypackage&subdirectory=foo/bar)' –
'子目录'是绝对如何指定一个子目录(即'pip install' GIT中+ HTTPS:// github.com /货盘/ click.git @主#蛋=点击例如-海军&子目录=实例/海军/'')。我认为你的问题是由其他问题引起的(克隆repo的问题?指定commit sha的错误语法?...)。 –
@EugenConstantinDinca我删除了那个并添加了额外的日志,它仍然没有做什么文档似乎建议? – enderland