为什么导入google.protobuf在ipython中运行正常但在python中运行不正常?

时间:2016-05-02 03:35:48

标签: python import ipython importerror protocol-buffers

在ipython中

/usr/local/bin/maker
/usr/local/bin/RepeatMasker

然而在python中:

Python 2.7.11 |Anaconda 2.4.1 (64-bit)
IPython 3.1.0 -- An enhanced Interactive Python.

In [1]: import google.protobuf

In [2]:

为什么会发生这种奇怪的错误?请帮我搞清楚。

1 个答案:

答案 0 :(得分:1)

也许这是因为我的anaconda protobuf包与系统的protobuf之间存在一些冲突。卸载protobuf后 pip uninstall protobuf conda uninstall protobuf 并重新安装 conda install protobuf 一切都很顺利。