[英]128 error while installing local python dependencies with requirements.txt
I tried to install local python dependencies with requirements.txt file我尝试使用 requirements.txt 文件安装本地 python 依赖项
My requirements.txt我的要求.txt
-e git+ssh://git@ext.my_gitlab.com/my_group/my_project.git@master#egg=my_project
-e git+ssh://git@ext.my_gitlab.com/my_group/my_project.git@master#egg=my_project
I got such error我收到了这样的错误
WARNING: Discarding git+ssh:// @ext.my_gitlab.com/my_group/my_project.git@master#egg=my_project.
警告:丢弃 git+ssh: //@ext.my_gitlab.com/my_group/my_project.git@master#egg=my_project。 Command errored out with exit status 128: git clone -q 'ssh:// @ext.my_gitlab.com/my_grouo/my_project.git' 'c:\polygon\projects\test_project\venv\src\my-project'.
命令出错,退出状态为 128:git clone -q 'ssh:// @ext.my_gitlab.com/my_grouo/my_project.git' 'c:\polygon\projects\test_project\venv\src\my-project'。 ERROR: Could not fine a version that satisfies the requirement my-project (unavailable).
错误:无法满足要求 my-project 的版本(不可用)。 ERORR: No matching distribution found for my-project (unavailable)
错误:没有为我的项目找到匹配的分布(不可用)
But then I install local dependencies with this command all dependencies install without any errors但是然后我使用此命令安装本地依赖项,所有依赖项都安装没有任何错误
pip install -U git+ssh://git@ext.my_gitlab.com/my_group/my_project.git@master
pip 安装 -U git+ssh://git@ext.my_gitlab.com/my_group/my_project.git@master
How to fix this problem with installation with requirements.txt?如何通过 requirements.txt 安装解决此问题? I follow the instructions from https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers
我按照https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers的说明进行操作
Check first if modifying your requirements.txt
to include the git@
user in the URL would work.首先检查修改您的
requirements.txt
以在 URL 中包含git@
用户是否可行。
You say pip install -U git+ssh://git@ext.my_gitlab.com/...
works.你说
pip install -U git+ssh://git@ext.my_gitlab.com/...
有效。
Therefore, the requirements.txt
should also include:因此,
requirements.txt
还应包括:
git+ssh://git@ext.my_gitlab.com/
^^^
The OP tibhar940 reports in the comments : OP tibhar940在评论中报告:
That was my fault - I tried
那是我的错——我试过了
-e git+ssh://git@ext.my_gitlab.com:my_group/my_project.git@master#egg=my_project
instead of
代替
-e git+ssh://git@ext.my_gitlab.com/my_group/my_project.git@master#egg=my_project
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.