开发者

bbfreeze and protobuf

开发者 https://www.devze.com 2023-04-09 04:42 出处:网络
I\'m trying to package a script with bbfreeze that uses the protocol buffers. Using bbfreeze like so:

I'm trying to package a script with bbfreeze that uses the protocol buffers. Using bbfreeze like so:

#!/usr/bin/python
from bbfreeze imp开发者_JAVA技巧ort Freezer
import os

f = Freezer('dist')
f.addScript('main.py')

f()

Results in No module named google.protbuf on the client. Reading the docs a bit, I try this:

#!/usr/bin/python
from bbfreeze import Freezer
import os

f = Freezer('dist',includes=["google.protobuf"])
f.addScript('main.py')

f()

Results in ImportError: No module named google when running the bbfreeze script.

bbfreeze is at version 0.97.3 installed from easy_install. Anyone run into this issue or a similar one previously?


Sounds like you have not installed protobuf... try "pip install protobuf" to install it from pypi.python.org/pypi/protobuf .

0

精彩评论

暂无评论...
验证码 换一张
取 消