p4runtime-shell icon indicating copy to clipboard operation
p4runtime-shell copied to clipboard

Error occurs when starting p4runtime-shell: No module named 'google.protobuf'

Open sadmankiba opened this issue 3 years ago • 1 comments

I built the docker image and tried to run p4runtime-shell with the provided python script p4runtime-sh-docker. The script generates the following error and does not start p4runtime-shell.

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/__main__.py", line 1, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/shell.py", line 27, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/p4runtime.py", line 17, in <module>
ModuleNotFoundError: No module named 'google.protobuf'

sadmankiba avatar Aug 03 '22 11:08 sadmankiba

I found that protobuf==4.21.4 was getting installed. Setting it to an earlier version, 3.17.3, in setup.py removes the error.

sadmankiba avatar Aug 03 '22 14:08 sadmankiba