实验问题记录

caffe中运行R_FCN:

1、ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/easydict-1.9.dist-info'
Consider using the `--user` option or check the permissions.

解决:权限不允许。只需要在命令行后面加上--user即可

pip install easydict --user

2、apt-get install python-opencv时遇见问题:

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

解决:锁文件问题。只需要在安装命令行前加上sudo即可

sudo apt-get install python-opencv

3、~/RFCN_ROOT/lib$ make,执行make时

Traceback (most recent call last):
  File "setup.py", line 58, in
    CUDA = locate_cuda()
  File "setup.py", line 53, in locate_cuda
    for k, v in cudaconfig.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1

解决:原因是使用的是Python3.5,需要将setup.py中的iteriterms改成items

4、在编译make -j8 && make pycaffe

/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:582: recipe for target '.build_release/lib/libcaffe.so.1.0.0' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1
解决:

修改Makefile文件LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

修改Makefile.config文件,在LIBRARY_DIRS后添加/usr/lib/x86_64-linux-gnu/hdf5/serial:

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

5、ImportError: dynamic module does not define module export function (PyInit__caffe)

解决:最终创建python27的虚拟环境。

你可能感兴趣的:(机器学习)