简体   繁体   English

PYCHARM导入Caffe错误

[英]PYCHARM import caffe error

I have tried several ideas to make caffe work on pycharm. 我尝试了几种方法使Caffe在pycharm上工作。

I have also added the path to the pycharm as well. 我也将路径添加到pycharm中。 在此处输入图片说明

在此处输入图片说明

import caffe doesnt work in pycharm but works in the terminal. 导入caffe在pycharm中不起作用,但在终端中起作用。

the caffe folder is also in my pythonpath. caffe文件夹也位于我的pythonpath中。

在此处输入图片说明

Fixed the issue. 解决了该问题。 I just had to edit the /etc/ld.so.conf file and add the lib dir of the Cuda libraries. 我只需要编辑/etc/ld.so.conf文件并添加Cuda库的lib目录。 In my case I added: 就我而言,我添加了:

/usr/local/cuda-7.5/lib64

Then run sudo ldconfig in the terminal and restart Pycharm. 然后在终端中运行sudo ldconfig并重新启动Pycharm。 It should work. 它应该工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM