为什么google.protobuf的导入在ipython中可以正常工作,但在python中却不行?

为什么google.protobuf的导入在ipython中可以正常工作,但在python中却不行?,python,import,ipython,importerror,protocol-buffers,Python,Import,Ipython,Importerror,Protocol Buffers,在伊皮顿 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]: 但是在python中: Python 2.7.11 |Anaconda 2.4.1 (64-bit) >>> import google.protobuf Traceback (most recent call

在伊皮顿

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]:
但是在python中:

Python 2.7.11 |Anaconda 2.4.1 (64-bit)
>>> import google.protobuf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named protobuf
>>>
Python 2.7.11 | Anaconda 2.4.1(64位) >>>导入google.protobuf 回溯(最近一次呼叫最后一次): 文件“”,第1行,在 ImportError:没有名为protobuf的模块 >>>
为什么会发生这种奇怪的错误?请帮我弄清楚。

也许这是因为我的protobuf的anaconda包和系统的protobuf之间存在一些冲突。卸载protobuf后

pip卸载协议
康达卸载协议
安装和重新安装

康达安装协议
现在一切都很好。

可能会重复