【问题标题】:Command Errored Exit Status 1: - Pytorch Object Detection命令错误退出状态 1:- Pytorch 对象检测
【发布时间】:2021-01-29 01:38:37
【问题描述】:

我尝试关注tutorial 来学习如何运行我自己的对象检测,但我遇到了一个似乎无法修复的错误。我在一些 git hubs 问题页面上找到了解决方案。他们建议运行:!pip install git+https://github.com/philferriere/cocoapi.git,但我仍然遇到同样的错误。我正在使用谷歌 Colab。有什么建议吗?

输入:

!pip installgit+https://github.com/cocodataset/cocoapi.git

输出:

Collecting git+https://github.com/cocodataset/cocoapi.git
  Cloning https://github.com/cocodataset/cocoapi.git to /tmp/pip-req-build-u21a5wjs
  Running command git clone -q https://github.com/cocodataset/cocoapi.git /tmp/pip-req-build-u21a5wjs
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

【问题讨论】:

  • 那么你想将cocoapi数据集添加到你的谷歌协作室
  • 是的,我相信是的。

标签: python git pytorch google-colaboratory


【解决方案1】:

这是https://github.com/cocodataset/cocoapi写的内容

安装:
对于 Python,在 coco/PythonAPI 下运行“make”

因此,即使在本地也无法进行 pip 安装。 在您的 google colaboratory 中按照以下步骤进行安装,

!git clone https://github.com/cocodataset/cocoapi.git
# by default you are in /content in google colab use !ls to check
!ls
cd cocoapi
!ls
# you will see these,  common   license.txt  LuaAPI  MatlabAPI  PythonAPI  README.txt  results
cd PythonAPI
!make
!make install

现在您的 cocoapi github 存储库已安装并可以使用了。
作为测试的示例代码,您可以尝试这些行,它应该不会显示任何错误。
from pycocotools.coco import COCO

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-03-05
    • 2021-10-29
    • 2021-05-31
    • 2020-07-08
    • 1970-01-01
    • 2020-03-07
    • 2020-03-12
    相关资源
    最近更新 更多