找不到`protoc`命令 [英] Cannot find `protoc` command

查看:1689
本文介绍了找不到`protoc`命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行此命令时:

protoc --python_out=. .\object_detection\protos\anchor_generator.proto

在命令行上的tensorflow对象检测文件上,我得到:

on a tensorflow object detection file on the command line, I get:

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

我遵循了 protoc object_detection/protos中的所有说明/*.proto:没有这样的文件或目录,但是它们从来没有为我服务

I followed all instructions in protoc object_detection/protos/*.proto: No such file or directory, but they never worked for me

除了搜索之外,我还尝试了以下命令:

In addition to the searches I made, I tried this command:

py-3.6 -m pip install protobuf

它对我有用.

我再次输入了命令

python_out=. .\object_detection\protos\anchor_generator.proto 

但是它仍然失败,并且:

But it still fails and this:

C:\Users\laptop market\Downloads\bin\protoc object_detection/protos/*.proto --py_out=.

也失败了.

推荐答案

您需要将zip文件中的protoc.exe文件保存到C:\Users\Satyarth\AppData\Local\Programs\Python\Python36\Scripts.

You need to save the protoc.exe file which is located in the zip file to C:\Users\Satyarth\AppData\Local\Programs\Python\Python36\Scripts.

用您的用户名替换路径中的"Satyarth".

Replace "Satyarth" from the path with your username.

如果仍然无法正常运行,请将上述路径放入环境变量中.

If it still isn't working, put the above path in the environment variables.

这篇关于找不到`protoc`命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆