2015-10-27 93 views
1

我嘗試了幾個想法,使咖啡因工作pycharm。PYCHARM進口咖啡錯誤

我也添加了pycharm的路徑。在pycharm enter image description here

enter image description here

進口朱古力不工作,但工作在終端。

caffe文件夾也在我的pythonpath中。

enter image description here

+0

考慮[改變你的](http://stackoverflow.com/questions/10095037/why-use-sys-path-appendpath-instead-of-sys-path-insert1-path)插入到'sys.path'到'sys.path.insert(1,caffee_root +'python')'。這***可能是這個原因。 –

+0

@DimitrisJim你爲什麼這麼認爲? – Shai

+0

您的導入錯誤抱怨CUDA庫。 CUDA可能不在pycharm的路徑中嗎? – Shai

回答

2

固定的問題。 我只需編輯/etc/ld.so.conf文件並添加Cuda庫的lib目錄。在我來說,我補充說:

/usr/local/cuda-7.5/lib64 

然後運行在終端sudo ldconfig,並重新啓動Pycharm。它應該工作。

+0

你是如何解決這個問題的?我想到Caffe沒有任何屬性,但在終端工作正常 – Burf2000