繁体   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