python - ImportError: No module named google.protobuf.text_format -
i can find text_format.py
file inside folder /usr/local/lib/python2.7/dist-packages/google/protobuf/
. in python program,i have error importerror: no module named google.protobuf.text_format
. set pythonpath
, echo $pythonpath
gives me
/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages/google/protobuf:
why line from google.protobuf.text_format import merge
in python program can't import google.protobuf.text_format
just create blank file in folder /usr/local/lib/python2.7/dist-packages/google/protobuf/
name __init__.py
run command , it:
touch /usr/local/lib/python2.7/dist-packages/google/protobuf/__init__.py
check if issues thereafter.
Comments
Post a Comment