[MacPorts] #48379: caffe import error Reason: image not found

MacPorts noreply at macports.org
Thu Jul 16 20:12:08 PDT 2015


#48379: caffe import error Reason: image not found
-----------------------------+-------------------
  Reporter:  hansimglueck@…  |      Owner:  hum@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.3.3
Resolution:                  |   Keywords:
      Port:  caffe           |
-----------------------------+-------------------
Description changed by ryandesign@…:

Old description:

> Import error for caffe on osx 10.10 and Pyhton 2.7
>
> adding
> export PYTHONPATH=/opt/local/libexec/caffe/python:$PYTHONPATH before
> macports import
> resolves the problem!!
>
> Folder
> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
> /site-packages/caffe exists, but is certainly not imported correctly...
>
> Thanks
>

> {{{
> python
>
> >>>import caffe
> ---------------------------------------------------------------------------
> ImportError                               Traceback (most recent call
> last)
> <ipython-input-1-1cca3aa1f8c5> in <module>()
> ----> 1 import caffe
>
> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
> /site-packages/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
>
> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
> /site-packages/caffe/pycaffe.py in <module>()
>      11 import numpy as np
>      12
> ---> 13 from ._caffe import Net, SGDSolver
>      14 import caffe.io
>      15
>
> ImportError:
> dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
> /site-packages/caffe/_caffe.so, 2): Library not loaded:
> @rpath/libcaffe.so
>   Referenced from:
> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
> /site-packages/caffe/_caffe.so
>   Reason: image not found
> }}}

New description:

 Import error for caffe on osx 10.10 and Pyhton 2.7

 adding
 {{{
 export PYTHONPATH=/opt/local/libexec/caffe/python:$PYTHONPATH before
 macports import
 }}}
 resolves the problem!!

 Folder
 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/caffe exists, but is certainly not imported correctly...

 Thanks


 {{{
 python

 >>>import caffe
 ---------------------------------------------------------------------------
 ImportError                               Traceback (most recent call
 last)
 <ipython-input-1-1cca3aa1f8c5> in <module>()
 ----> 1 import caffe

 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/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

 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/caffe/pycaffe.py in <module>()
      11 import numpy as np
      12
 ---> 13 from ._caffe import Net, SGDSolver
      14 import caffe.io
      15

 ImportError:
 dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/caffe/_caffe.so, 2): Library not loaded: @rpath/libcaffe.so
   Referenced from:
 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/caffe/_caffe.so
   Reason: image not found
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/48379#comment:4>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list