python protobuf 程序 使用 pyintaller 打包exe无法运行解决办法
python protobuf 程序 使用 pyintaller 打包exe无法运行
我写了个程序使用google protobuf 发协议测试服务器性能, 在本地python环境运行.py是OK没问题的。 使用pyinstaller 打包exe程序运行出错:
google和百度了一天都没解决,重装过setuptools 和 protobuf 模块依然不行。
开发环境是windows 7, python 2.7。
问题影响我的工作,求大婶们帮帮忙。
------解决思路----------------------
一般打包后报错说缺模块,不是重新安装模块, 而是重新打包,手动添加参数加入某个模块...
我写了个程序使用google protobuf 发协议测试服务器性能, 在本地python环境运行.py是OK没问题的。 使用pyinstaller 打包exe程序运行出错:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files (x86)\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_importers.py", line 270, in load_module
exec(bytecode, module.__dict__)
File "E:\work pace\Test\build\TestProtocBuf\out00-PYZ.pyz\c2s_rpc_request_pb2", line 6, in <module>
File "build\bdist.win32\egg\google\__init__.py", line 1, in <module>
ImportError: No module named pkg_resources
google和百度了一天都没解决,重装过setuptools 和 protobuf 模块依然不行。
开发环境是windows 7, python 2.7。
问题影响我的工作,求大婶们帮帮忙。
------解决思路----------------------
一般打包后报错说缺模块,不是重新安装模块, 而是重新打包,手动添加参数加入某个模块...