简体   繁体   English

命令错误退出状态 1:-Pytorch 对象检测

[英]Command Errored Exit Status 1: - Pytorch Object Detection

I tried to follow this tutorial to learn how to run my own object detection, but I am running into an error that I can't seem to fix.我试图按照本教程学习如何运行我自己的对象检测,但我遇到了一个似乎无法修复的错误。 I found a solution on some git hubs issues pages.我在一些 git hubs 问题页面上找到了解决方案。 They suggested running: !pip install git+https://github.com/philferriere/cocoapi.git , but I still get the same error.他们建议运行: !pip install git+https://github.com/philferriere/cocoapi.git ,但我仍然得到同样的错误。 I am using Google Colab.我正在使用 Google Colab。 Any suggestions?有什么建议?

input:输入:

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

output:输出:

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.

This is what is written in https://github.com/cocodataset/cocoapi这是写在https://github.com/cocodataset/cocoapi

To install:安装:
For Python, run "make" under coco/PythonAPI对于 Python,在 coco/PythonAPI 下运行“make”

So you cannot do pip install even in local.所以即使在本地你也不能进行 pip install 。 Follow these steps in your google colaboratory to install,按照您的 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

Now your cocoapi github repository is installed and is ready to use.现在您的 cocoapi github 存储库已安装并可以使用。
As a sample code to test you can try these lines, it should show no errors.作为测试的示例代码,您可以尝试这些行,它应该不会显示任何错误。
from pycocotools.coco import COCO

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM