诗歌:如何从 git 子目录安装?

Fel*_*lix 3 python pip python-poetry

我想安装feastpython 包poetry

\n

pip3 install git+https://github.com/feast-dev/feast#subdirectory=sdk/python工作正常,

\n

poetry add git+https://github.com/feast-dev/feast#subdirectory=sdk/python给出了一个错误:

\n
  CalledProcessError\n\n  Command '['git', '--git-dir', '/tmp/pypoetry-git-feas51ct2_me/.git', '--work-tree', '/tmp/pypoetry-git-feas51ct2_me', 'checkout', 'subdirectory=sdk/python']' returned non-zero exit status 1.\n\n  at /usr/lib/python3.8/subprocess.py:516 in run\n       512\xe2\x94\x82             # We don't call process.wait() as .__exit__ does that for us.\n       513\xe2\x94\x82             raise\n       514\xe2\x94\x82         retcode = process.poll()\n       515\xe2\x94\x82         if check and retcode:\n    \xe2\x86\x92  516\xe2\x94\x82             raise CalledProcessError(retcode, process.args,\n       517\xe2\x94\x82                                      output=stdout, stderr=stderr)\n       518\xe2\x94\x82     return CompletedProcess(process.args, retcode, stdout, stderr)\n       519\xe2\x94\x82 \n       520\xe2\x94\x82 \n
Run Code Online (Sandbox Code Playgroud)\n

我该如何修复它?

\n

dan*_*van 5

从诗 1.2开始,您可以安装驻留在远程子目录中的 VCS 项目。您pyproject.toml将包含以下内容;

[tool.poetry.dependencies]
feast = { git = "ssh://git@github.com/feast-dev/feast.git", subdirectory = "sdk/python" }
Run Code Online (Sandbox Code Playgroud)

例如。