Skip to main content
 首页 » 编程设计

python之导入caffe时出错

2024年10月24日9findumars

DeepDream或其他深度学习项目,搭建Caffe环境。

我安装了 PyCaffe 所需的包,并将 PYTHONPATH 设置为 caffe/python。

但是当我在 python 上导入 caffe 时:

import caffe 

出现如下错误,如何解决?

Segmentation fault: 11 

请您参考如下方法:

您使用的是 Mac 吗?我很难在 mac 上制作 pycaffe,直到我意识到所有 mac 上都安装了 native python,并且我正在使用我安装的另一个版本。在编译时,caffe 使用了一些来自 native python 的东西,以及一些来自其他 python 的东西。我必须确保更改 makefile.config 文件中的所有相关路径并更改我的 bash 使用的 python。我也建议在虚拟环境中工作。 This是一个很好的帮助你的链接,祝你好运!