编译SSD版caffe的python接口,出现以下问题
.build_release/lib/libcaffe.so: undefined reference to `PyUnicodeUCS2_FromEncodedObject’
网上查了下相关的资料,最后在python文档中找到了这个问题
https://docs.python.org/2/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance
主要问题在于该版本caffe依赖的是4-byte Unicode,而系统的是2-byte Unicode,具体解决方法是重新编译python,并添加编译选项–enable-unicode
./configure --prefix=$YOUR_PATH --enable-unicode=ucs4
然后重新编译caffe就好了