安装python protobuf模块遇到的问题

Posted zwalker

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装python protobuf模块遇到的问题相关的知识,希望对你有一定的参考价值。

安装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

以上是关于安装python protobuf模块遇到的问题的主要内容,如果未能解决你的问题,请参考以下文章