装置python protobuf模块,首先装置pip,mac零碎的python自带easy_install,因而间接输出命令:sudo easy_install pip;再通过pip来装置protobuf,命令:pip install protobuf;
遇到的问题:mac下python的six模块版本较低,且因为零碎起因,无奈被卸载装置新版,而pip在装置protobuf时须要,默认会下载安装较新版本的six模块,因而这里呈现了抵触。只需在应用pip装置python模块前,执行该命令即可:
pip install --ignore-installed six