google protobuf编译安装(ImportError: No module named google.protobuf.internal)
2016-08-05 14:52
721 查看
来源:http://blog.csdn.net/woainiwss/article/details/50585665
最近在编译caffe python接口,python下import caffe报这个错误
ImportError: No module named google.protobuf.internal
原因是之前一步 pip install -r requirement.txt不成功,原因是数据源拉不到东西,只得自己亲手安装了。
首先现在protobuf
下载protobuf-2.3.0:
http://protobuf.googlecode.com/files/protobuf-2.3.0.zip
上边这个地址是在别的博客找到的,caffe要求这个版本要>=2.5.0,自己手动把地址里边的版本改为2.5.0成功下载。
接下来就是安装了:
unzip
protobuf-2.5.0
cd
protobuf-2.5.0
chmod
777 configure
./configure
make
-j4
make
check -j4
make
install
make
install 完貌似有报错,我主要用python接口这个就没管
接下来编译python接口的(不需要python接口的请跳过)
cd ./python
python setup.py build
python setup.py test
python setup.py install
验证使用命令 protoc -version
这步我还没有得到结果。
可是在python 下使用
>>import google.protobuf
没有报错,那就是能用了。
那些错误我估计是环境变量什么的问题,先不去找这个原因了。
最近在编译caffe python接口,python下import caffe报这个错误
ImportError: No module named google.protobuf.internal
原因是之前一步 pip install -r requirement.txt不成功,原因是数据源拉不到东西,只得自己亲手安装了。
首先现在protobuf
下载protobuf-2.3.0:
http://protobuf.googlecode.com/files/protobuf-2.3.0.zip
上边这个地址是在别的博客找到的,caffe要求这个版本要>=2.5.0,自己手动把地址里边的版本改为2.5.0成功下载。
接下来就是安装了:
unzip
protobuf-2.5.0
cd
protobuf-2.5.0
chmod
777 configure
./configure
make
-j4
make
check -j4
make
install
make
install 完貌似有报错,我主要用python接口这个就没管
接下来编译python接口的(不需要python接口的请跳过)
cd ./python
python setup.py build
python setup.py test
python setup.py install
验证使用命令 protoc -version
这步我还没有得到结果。
可是在python 下使用
>>import google.protobuf
没有报错,那就是能用了。
那些错误我估计是环境变量什么的问题,先不去找这个原因了。
相关文章推荐
- golang 小web
- golang 上传文件
- 如何在DragonBoard 410c上添加一个customized virtual sensors
- go 接口
- Django学习
- Go语言编程(四)之变量
- 给Django后台富文本编辑器添加上传文件的功能
- This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms. 此实现不是 Windows 平台 FIPS 验证的加密算法的一部分 解决方案
- 高通DragonBoard 410c MIPI-DIS显示功能及驱动移植
- B - Discovering Gold Light oj 1030
- mongo-c-driver使用VS2013编译
- HDU 3996 Gold Mine 最大权闭合图
- Google宣布对其域名启用HSTS协议(转)
- GoEasy使用方法记录
- Go语言编程(三)之过过瘾
- hdoj-1847-Good Luck in CET-4 Everybody!
- Django Channels简明实践
- Golang 测试
- HDU 4722 Good Numbers 2013年四川省赛题
- 结合 category 工作原理分析 OC2.0 中的 runtime