为 Windows 安装 python protobuf [英] python protobuf install for windows

查看:71
本文介绍了为 Windows 安装 python protobuf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试在 windows 上为 python 安装版本 3 的 google 协议缓冲区.

I am currently trying to install version 3 of google protocol buffer on windows for python.

我已经通过命令行进入了 python 文件夹,我正在尝试使用:
python setup.py build

I have gone to the python folder through the command line and I am attempting to use:
python setup.py build

但是我收到以下错误:
python : protoc 未安装,也未在 ../src 中找到.请编译或安装二进制包.

这是怎么回事?

推荐答案

正如错误所说,您必须先安装 protoc.exe.您可以从每个 Protobuf 版本附带的 Win32 包中获取它.最新版本在这里:

As the error says, you must first install protoc.exe. You can get it from the Win32 package included with every Protobuf release. The latest version is here:

https://github.com/google/protobuf/releases/download/v3.0.0-alpha-3/protoc-3.0.0-alpha-3-win32.zip

(您也可以通过下载 C++ 源代码版本从源代码构建 protoc.)

(You can also build protoc from source by downloading the C++ source code release.)

这篇关于为 Windows 安装 python protobuf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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