Caffe2 - Python API
A deep learning, cross platform ML framework
Variables
diagnose_protobuf Namespace Reference

Module scripts.diagnose_protobuf. More...

Variables

 python_version = google.protobuf.__version__
 
bool python_protobuf_installed = True
 
string protoc_name = 'protoc.exe'
 
 p = Popen([protoc_name, '--version'], stdout=PIPE, stderr=PIPE)
 
 out
 
 err
 
bool native_protobuf_installed = False
 
 tmp = re.search(r'\d\.\d\.\d', out)
 
 native_version = tmp.group(0)
 
string PYTHON_PROTOBUF_NOT_INSTALLED
 
string NATIVE_PROTOBUF_NOT_INSTALLED
 
string VERSION_MISMATCH
 
 py_ver
 
 native_ver
 

Detailed Description

Module scripts.diagnose_protobuf.

Variable Documentation

string diagnose_protobuf.NATIVE_PROTOBUF_NOT_INSTALLED
Initial value:
1 = """
2 You have not installed the protoc binary. Protoc is needed to compile Caffe2
3 protobuf source files. Depending on the platform you are on, you can install
4 protobuf via:
5  (1) Mac: using homebrew and do brew install protobuf.
6  (2) Linux: use apt and do apt-get install libprotobuf-dev
7  (3) Windows: install from source, or from the releases here:
8  https://github.com/google/protobuf/releases/
9 """

Definition at line 67 of file diagnose_protobuf.py.

string diagnose_protobuf.PYTHON_PROTOBUF_NOT_INSTALLED
Initial value:
1 = """
2 You have not installed python protobuf. Protobuf is needed to run caffe2. You
3 can install protobuf via pip or conda (if you are using anaconda python).
4 """

Definition at line 62 of file diagnose_protobuf.py.

string diagnose_protobuf.VERSION_MISMATCH
Initial value:
1 = """
2 Your python protobuf is of version {py_ver} but your native protoc version is of
3 version {native_ver}. This will cause the installation to produce incompatible
4 protobuf files. This is bad in general - consider installing the same version.
5 """

Definition at line 77 of file diagnose_protobuf.py.