首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么pipenv模块从git安装到git与鸡蛋碎片即使有需求也失败了吗?

为什么pipenv模块从git安装到git与鸡蛋碎片即使有需求也失败了吗?
EN

Stack Overflow用户
提问于 2021-09-24 20:09:04
回答 1查看 301关注 0票数 0

使用Python3.9.5在Windows 10上使用pipenv。我试着用:

pipenv install git+https://github.com/John-Polo/cocoapi.git#egg=PythonAPI

我的回购目录树看起来像

代码语言:javascript
复制
cocoapi/PythonAPI/pycocotools
                -/setup.py
                -[more directories]

当我运行pipenv install时,结果是:

代码语言:javascript
复制
(test-jpGYXydt) C:\Users\john\Documents\code\test>pipenv install git+https://github.com/John-Polo/cocoapi.git#egg=foo
Installing git+https://github.com/John-Polo/cocoapi.git#egg=foo...
Error:  An error occurred while installing git+https://github.com/John-Polo/cocoapi.git#egg=foo!
Error text: Collecting foo
  Cloning https://github.com/John-Polo/cocoapi.git to c:\users\john\appdata\local\temp\pip-install-9ocvuaci\foo_47404cbbe883400593b4786c6adbe805
  Resolved https://github.com/John-Polo/cocoapi.git to commit 2929bd2ef6b451054755dfd7ceb09278f935f7ad

  Running command git clone -q https://github.com/John-Polo/cocoapi.git 'C:\Users\john\AppData\Local\Temp\pip-install-9ocvuaci\foo_47404cbbe883400593b4786c6adbe805'
ERROR: File "setup.py" not found for legacy project foo from git+https://github.com/John-Polo/cocoapi.git#egg=foo (from -r c:\users\john\appdata\local\temp\pipenv-qmfhwbjb-requirements\pipenv-2bqximai-requirement.txt (line 1)).

Installation Failed

当文件包含在"setup.py" not found树中时,我不明白为什么安装PythonAPI失败。我怎么才能解决这个问题?

编辑:在冈萨洛发表评论后,我将setup.py的位置从

代码语言:javascript
复制
cocoapi/PythonAPI/pycocotools
                -/setup.py

代码语言:javascript
复制
cocoapi/PythonAPI/pycocotools
cocoapi/setup.py

现在我得到了一个不同的错误。但这并不是一个没有找到setup.py的错误,所以这个更改似乎解决了这个问题所涉及的错误。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-09-27 19:59:40

pip期望git存储库根目录上有您的setup.py,如下所示:

代码语言:javascript
复制
cocoapi/PythonAPI/pycocotools
cocoapi/setup.py
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69320638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档