我正在尝试在 Linux 中安装 opencv 库,但在 python 脚本生成的日志中出现以下错误:
Traceback (most recent call last):
File "/tmcleod/opencv-2.4.4/modules/java/generator/gen_javadoc.py", line 257, in ?
import hdr_parser
File "/tmcleod/opencv-2.4.4/modules/java/generator/../../python/src2/hdr_parser.py", line 641
decl[1] = ": " + ", ".join([b if "::" in b else self.get_dotted_name(b).replace(".","::") for b in bases])
^
SyntaxError: invalid syntax
这是生成文件中导致错误的命令:
cd /tmcleod/opencv-2.4.4/release/modules/java && /usr/bin/python2 /tmcleod/opencv-2.4.4/modules/java/generator/gen_javadoc.py --modules core,imgproc,objdetect,features2d,video,highgui,ml,calib3d,photo,contrib /tmcleod/opencv-2.4.4/modules/java/generator/src/java /tmcleod/opencv-2.4.4/release/modules/java 2>"/tmcleod/opencv-2.4.4/release/modules/java/get_javadoc_errors.log"
我不知道为什么我需要在安装 C++ 库时生成 java 文档,但问题是导致构建失败。任何帮助表示赞赏。