简体   繁体   English

使用 requirements.txt 安装本地 python 依赖项时出现 128 错误

[英]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.

相关问题 从 python 3.9 中的 requirements.txt 安装软件包时出错 - Error while Installing Packages from requirements.txt in python 3.9 Jedi python 在从 requirements.txt 安装软件包时未安装 - Jedi python is not installing while installing packages from requirements.txt “安装Quartz模块时没有这样的文件:'requirements.txt'错误” - “No such file: 'requirements.txt' error” while installing Quartz module 安装Requirements.txt会导致无效语法错误Python 3.7 - Installing Requirements.txt results in Invalid Syntax Error Python 3.7 使用 AWS Elastic Beanstalk 中的 requirements.txt 文件为 flask-mysql 应用程序安装依赖项时遇到错误 - Error encountered while installing dependencies for flask-mysql application using requirements.txt file in AWS Elastic Beanstalk 安装 requirements.txt 在 Django 上抛出错误 - Installing requirements.txt throws an error on Django 在 heroku 上安装 requirements.txt 运行错误 - Installing requirements.txt on heroku runs error 安装 manim 时在 windows 上安装 requirements.txt 文件时出现问题 - Trouble in installing requirements.txt file on windows while installing manim 如何在本地 Python 项目的 Yocto 配方中从 requirements.txt 安装依赖项 - How to install dependencies from requirements.txt in a Yocto recipe for a local Python project requirements.txt 中的依赖关系描述 - Description of dependencies in requirements.txt
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM