Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error make pytest #5254

Closed
VioletLover opened this issue Feb 4, 2017 · 3 comments
Closed

error make pytest #5254

VioletLover opened this issue Feb 4, 2017 · 3 comments

Comments

@VioletLover
Copy link

VioletLover commented Feb 4, 2017

when I want to make pyest error after already successfully done with the all, test, runtest and pycaffe, and something went wrong as below:
cd python; python -m unittest discover -s caffe/test
EEEEEEEE

ERROR: test_coord_map (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_coord_map
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_coord_map.py", line 6, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

======================================================================
ERROR: test_io (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_io
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_io.py", line 4, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

======================================================================
ERROR: test_layer_type_list (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_layer_type_list
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_layer_type_list.py", line 3, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

======================================================================
ERROR: test_net (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_net
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_net.py", line 8, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

======================================================================
ERROR: test_net_spec (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_net_spec
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_net_spec.py", line 3, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

======================================================================
ERROR: test_python_layer (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_python_layer
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_python_layer.py", line 6, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

======================================================================
ERROR: test_python_layer_with_param_str (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_python_layer_with_param_str
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_python_layer_with_param_str.py", line 6, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

======================================================================
ERROR: test_solver (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_solver
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/Users/yolanda/caffe/python/caffe/test/test_solver.py", line 7, in
import caffe
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

and when I try importing caffe in shell I got the error as below:
Traceback (most recent call last):
File "", line 1, in
File "caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: dlopen(caffe/_caffe.so, 2): Library not loaded: @rpath/libopencv_imgcodecs.3.2.dylib
Referenced from: /Users/yolanda/caffe/python/caffe/_caffe.so
Reason: image not found

but when I use 'otool -L python/caffe/_caffe.so' it shows as below which contains libopencv_imgcodecs:
python/caffe/_caffe.so:
python/caffe/_caffe.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libcaffe.so.1.0.0-rc3 (compatibility version 0.0.0, current version 0.0.0)
/usr/local/opt/glog/lib/libglog.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/gflags/lib/libgflags.2.2.dylib (compatibility version 2.2.0, current version 2.2.0)
/usr/local/opt/protobuf/lib/libprotobuf.12.dylib (compatibility version 13.0.0, current version 13.0.0)
/usr/local/opt/leveldb/lib/libleveldb.1.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, current version 5.1.0)
/usr/local/opt/lmdb/lib/liblmdb.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/opt/boost/lib/libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/opt/hdf5/lib/libhdf5_hl.10.dylib (compatibility version 12.0.0, current version 12.1.0)
/usr/local/opt/hdf5/lib/libhdf5.10.dylib (compatibility version 13.0.0, current version 13.1.0)
@rpath/libopencv_imgcodecs.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
@rpath/libopencv_highgui.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
@rpath/libopencv_imgproc.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
@rpath/libopencv_core.3.2.dylib (compatibility version 3.2.0, current version 3.2.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
/usr/local/opt/boost/lib/libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/opt/boost/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/boost-python/lib/libboost_python.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.10)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)

when I check the opencv lib there doesn't exist this library.
Do I need to download that and install path?

Your system configuration

Operating system: Mac OS sierra 10.12.3
CMakeLists.txt

@VioletLover VioletLover changed the title error make purest error make pytest Feb 4, 2017
@shelhamer
Copy link
Member

From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:

Please do not post usage, installation, or modeling questions, or other requests for help to Issues.
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.

@yidian7
Copy link

yidian7 commented Jun 7, 2017

hi,i have the same problem .have you solved it ?

@huige555551
Copy link

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants