重要错误:dlopen(…)库未打开

2024-05-15 13:12:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在运行OSx 10.9.5的mac上运行Google Research's DeepDream code
我必须安装一些依赖项。我使用的是python的Anaconda发行版,我确保我有所有需要的包。在

最困难的是安装咖啡馆。我用fink安装了ATLAS。然后我编译了caffe和pycaffe。当我运行'makeruntest'时,所有的测试都通过了。我还运行了“make distribute”。在

运行the notebook released from Google时,出现以下错误:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-453033db464f> in <module>()
     11 
     12 
---> 13 import caffe
     14 
     15 

/Users/Andrea/caffe/python/caffe/__init__.py in <module>()
----> 1 from .pycaffe import Net, SGDSolver
      2 from ._caffe import set_mode_cpu, set_mode_gpu, set_device, Layer, get_solver
      3 from .proto.caffe_pb2 import TRAIN, TEST
      4 from .classifier import Classifier
      5 from .detector import Detector

/Users/Andrea/caffe/python/caffe/pycaffe.py in <module>()
     11 import numpy as np
     12 
---> 13 from ._caffe import Net, SGDSolver
     14 import caffe.io
     15 

ImportError: dlopen(/Users/Andrea/caffe/python/caffe/_caffe.so, 2): Library not loaded: @rpath/libcudart.7.0.dylib
  Referenced from: /Users/Andrea/caffe/python/caffe/_caffe.so
  Reason: image not found

我能做些什么来解决这个问题?在


here is the screendump requested in a comment


Tags: infrompyimportnetmodegoogleusers
1条回答
网友
1楼 · 发布于 2024-05-15 13:12:55

libcudart.7.0.dylib是一个与GPU相关的库。在

你正在运行的机器有GPU吗?如果不是,则需要在中指定CPU模式生成文件.config去咖啡馆。在

如果你有GPU,那么请看这里。 https://github.com/BVLC/caffe/issues/779

相关问题 更多 >