簡體   English   中英

命令錯誤退出狀態 1:-Pytorch 對象檢測

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

我試圖按照本教程學習如何運行我自己的對象檢測,但我遇到了一個似乎無法修復的錯誤。 我在一些 git hubs 問題頁面上找到了解決方案。 他們建議運行: !pip install git+https://github.com/philferriere/cocoapi.git ,但我仍然得到同樣的錯誤。 我正在使用 Google 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.

這是寫在https://github.com/cocodataset/cocoapi

安裝:
對於 Python,在 coco/PythonAPI 下運行“make”

所以即使在本地你也不能進行 pip 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

現在您的 cocoapi github 存儲庫已安裝並可以使用。
作為測試的示例代碼,您可以嘗試這些行,它應該不會顯示任何錯誤。
from pycocotools.coco import COCO

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM