我使用的是openSUSE 13.2,並通過YaST安裝了用於Python的Google Protocol Buffers庫;總而言之,我已經安裝了軟件包:Anaconda Python無法找到已安裝的軟件包,而系統Python可以使用
libprotobuf-c0 -> C Bindings
libprotobuf-lite8 -> Protocol Buffers Library
libprotobuf8 -> Protocol Buffers Library
protobuf-devel -> Headers & Libraries
python-protobuf -> Python Bindings
我是新來使用蟒蛇和IPython的筆記本電腦,但我試圖用Protocol Buffers的存在。 Anaconda已通過其標準bash
安裝程序安裝到~/anaconda
並且未修改PATH
。我已成功啓動IPython的筆記本電腦,但是當我試圖訪問協議緩衝區我得到一個錯誤:
# Attempted Code
from google.protobuf import text_format
# Error
ImportError: no module named google.protobuf
然而,當我嘗試使用系統安裝了Python(通過YaST進行安裝,並通過python
訪問時導入相同的模塊在終端),那麼它進口沒有問題。
有沒有什麼特別的我需要用Anaconda來完成系統安裝的Python庫?
相關:http://stackoverflow.com/questions/27215170/integrating-exisiting-python-library-to-anaconda – cel