Closed mislulu closed 6 years ago
Hi @mislulu https://github.com/NVIDIA/caffe#useful-notes
Thanks for your help. I have solved the problem mentioned above. But now I have faced a new issue. As I want caffe work with python. So I umcomment the WITH_PYTHON_LAYER := 1 change the python path PYTHON_INCLUDE := /usr/include/python2.7 \ /home/ga47kes/.local/lib/python2.7/site-packages/numpy/core/include pip install all the packages in the python/requirements.txt I have made pycaffe and it worked. But when I made pytest, it has shown such error:
ImportError: Failed to import test module: test_solver
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/home/ga47kes/nccl/caffe-0.16.5/python/caffe/test/test_solver.py", line 7, in
Ran 12 tests in 0.001s
FAILED (errors=12) Makefile:569: recipe for target 'pytest' failed make: *** [pytest] Error 1
What's the reason for this? What should I do to the caffe work with python ? Thanks for your kindness!
hi @mislulu please install all of these: https://github.com/NVIDIA/caffe/blob/caffe-0.16/python/requirements.txt
Thanks a lot. I used this requirement.txt, but something weird happened. I have got a such error:
ImportError: Failed to import test module: test_solver
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
import(name)
File "/home/ga47kes/nccl/caffe-0.16.5/python/caffe/test/test_solver.py", line 7, in
Ran 12 tests in 0.001s
FAILED (errors=12) Makefile:569: recipe for target 'pytest' failed make: *** [pytest] Error 1
I have already got this module. ga47kes@tueimmk-dan11:~/nccl/caffe-0.16.5$ pip install scipy Requirement already satisfied: scipy in /home/ga47kes/anaconda2/lib/python2.7/site-packages
Why this happened ? Thanks for your kindness!
@mislulu your python environment seems to be broken. Try to reinstall scipy and use plain Ubuntu Python, not anaconda2.
Thanks for your help ! I have reinstall the scipy and make pytest run correctly. But there was something weird happened again. Great sorry for bothering you again. When I use python, I couldn't import caffe. But if I changed to sudo python , it worked. Now I couldn't import caffe module to python normally. How could I solve this issue?
ga47kes@tueimmk-dan11:~/install/caffe-0.16.5/python$ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import caffe WARNING: Logging before InitGoogleLogging() is written to STDERR F0223 10:07:39.996796 18166 common.cpp:464] Check failed: status == CUBLAS_STATUS_SUCCESS (1 vs. 0) CUBLAS_STATUS_NOT_INITIALIZED Check failure stack trace: Aborted (core dumped) ga47kes@tueimmk-dan11:~/install/caffe-0.16.5/python$ sudo python Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. import caffe
Sorry, I can't help here because it's not NVCaffe issue.
Hello, I have installed the nvcaffe.0.16.5 on my computer. It has appeared this error. I added LIBRARIES += boost_thread stdc++ boost_regex at the bottom of Makefile.config (https://github.com/NVIDIA/caffe/issues/471), but it still didn't work. Can any one help me solve this problem.
CXX tools/device_query.cpp CXX tools/extract_features.cpp CXX tools/finetune_net.cpp CXX tools/caffe.cpp CXX tools/upgrade_net_proto_text.cpp CXX examples/cifar10/convert_cifar_data.cpp CXX examples/mnist/convert_mnist_data.cpp CXX examples/siamese/convert_mnist_siamese_data.cpp CXX examples/cpp_classification/classification.cpp CXX .build_release/src/caffe/proto/caffe.pb.cc AR -o .build_release/lib/libcaffe-nv.a LD -o .build_release/lib/libcaffe-nv.so.0.16.5 /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libturbojpeg.a(libturbojpeg_la-turbojpeg.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libturbojpeg.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status Makefile:605: recipe for target '.build_release/lib/libcaffe-nv.so.0.16.5' failed make: *** [.build_release/lib/libcaffe-nv.so.0.16.5] Error 1