【发布时间】:2015-09-27 07:35:49
【问题描述】:
我正在努力实现 Google 的远大梦想。出于某种奇怪的原因,我不断得到
ImportError: 没有名为 google.protobuf 的模块
在尝试导入 protobuf 之后。我已经使用sudo install protobuf 安装了 protobuf。我正在运行 python 2.7 OSX Yosemite 10.10.3。
我认为这可能是部署位置问题,但我在网上找不到任何关于它的信息。目前正在部署到 /usr/local/lib/python2.7/site-packages。
【问题讨论】:
-
你 pip install google.protobuf 了吗?
-
我做了“pip install protobuf”,但我仍然得到 ImportError: No module named google.protobuf after using "from google.protobuf import text_format" in python 2.7.6
-
你的电脑有没有可能有两条蟒蛇?如果您确实直接从脚本文件夹中使用 pip
-
我认为你正在做某事。我确实有多个 python 版本。直接从脚本文件夹中使用 pp 是什么意思?
标签: python installation protocols protocol-buffers deep-dream