配置caffe的Python接口(windows/ubuntu)

在windows/ubuntu下安裝好caffe和Python並按步驟編譯完成後,在終端中使用Python時遇到如下問題:

 

 

  1. Microsoft Windows [版本 6.1.7601]  
  2. 版權所有 (c) 2009 Microsoft Corporation。保留所有權利。  
  3. C:\Users\Lucifer>python  
  4. Python 2.7.12 |Anaconda 4.2.0 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.  
  5. 1500 64 bit (AMD64)] on win32  
  6. Type "help", "copyright", "credits" or "license" for more information.  
  7. Anaconda is brought to you by Continuum Analytics.  
  8. Please check out: http://continuum.io/thanks and https://anaconda.org  
  9. >>> import caffe  
  10. ······
  11. ImportError: No module named google.protobuf.internal 

 

 

這是由於缺少protobuf所致,解決辦法:直接在終端下安裝protobuf 即可

 

 

  1. C:\Users\Lucifer>pip install protobuf  

 

 

安裝完成後,錯誤得到解決:

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章