简体   繁体   中英

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. They suggested running: !pip install git+https://github.com/philferriere/cocoapi.git , but I still get the same error. I am using 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

To install:
For Python, run "make" under coco/PythonAPI

So you cannot do pip install even in local. Follow these steps in your google colaboratory to install,

!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.
As a sample code to test you can try these lines, it should show no errors.
from pycocotools.coco import COCO

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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