首页 > 解决方案 > 如何修复错误:“make”不是内部或外部命令、可运行程序或批处理文件

问题描述

我尝试使用代码在win10中安装COCO API

git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
cp -r pycocotools <path_to_tensorflow>/models/research/

在第 3 步中,我遇到了一个错误:

'make' is not recognized as an internal or external command,
operable program or batch file.

我尝试修复它,然后我遇到问题是我没有路径 gnuwin32

什么是 gnuwin32 ?以及如何修复错误“make”无法识别?

标签: pythontensorflowobject-detection

解决方案


'make' 是一个可以在 Linux 上运行的程序。在 Windows 上,您无法运行它。您必须使用 Visual Studio 或其他编译工具。

您正在尝试在您的手上构建 COCO API。但这对您来说可能很复杂,尤其是在 Windows 上。

我推荐使用 pip 安装 COCO API

通常,您可以这样运行:

pip install pycocotools

但在 Windows 上,您可能会遇到一些错误。在这种情况下,您可以运行修改后的版本。

尝试这个 :

pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI

如果安装成功,则不需要自己构建 COCO API。

我希望它对你有帮助。


推荐阅读