0
我嘗試安裝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
這裏是在makefile導致該命令錯誤:
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文檔,但問題是導致生成失敗。任何幫助讚賞。
我有同樣的確切問題。我只需要python庫,所以作爲解決方案,我將編譯後的共享對象文件(cv2.so)複製到我的工作目錄中。 – Moshe 2013-03-28 02:54:29
@Moshe,這是在Python腳本中的錯誤? – ThomasMcLeod 2013-03-28 03:00:37
雖然該語法似乎對Python 2.7來說是合法的,但我不知道什麼是錯誤的(我使用了'[b如果b在'abc'else'X'中爲'abcdefgh']'作爲一個小測試用例)。 – Moshe 2013-03-28 03:59:58