anaconda import tensorflow 后出现 google - protobuf 类似错误解决方法

执行:

python -c "import tensorflow"

出现错误,最后一段如下,

ImportError: /home/hanxinle/anaconda2/envs/tfdeeplearning/lib/python3.5/site-packages/google/protobuf/pyext/_message.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZNK6google8protobuf10TextFormat17FieldValuePrinter9PrintBoolEb

使用,

conda install -c anaconda protobuf

参考:

[1] https://github.com/openai/baselines/issues/742 (解决方法在此处)

[2] https://github.com/conda-forge/opencv-feedstock/issues/111#issuecomment-404356834

[3] https://github.com/conda-forge/tensorflow-feedstock/issues/57