Windows上的openCV构建JS文件

时间:2018-08-30 14:28:15

标签: javascript python opencv

我执行此tuto:https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html

这是https://docs.opencv.org/3.4.0/d4/da1/tutorial_js_setup.html

我已经在'emcc' to 'emcc.bat'中更改了一段代码opencv/platforms/js/build_js.py

运行python platforms/js/build_js.py build_js时出现此错误:

Args: Namespace(build_dir='build_js', build_doc=False, build_test=False, build_wasm=False, clean_build_dir=False, config_only=False, emscripten_dir='C:\\Users\\ckws\\Desktop\\emsdk\\emscripten\\1.38.11', enable_exception=False, opencv_dir='C:\\Users\\ckws\\Desktop\\opencv', skip_config=False)
Check dir C:\Users\ckws\Desktop\opencv\build_js (create: True, clean: False)
Check dir C:\Users\ckws\Desktop\opencv (create: False, clean: False)
Check dir C:\Users\ckws\Desktop\emsdk\emscripten\1.38.11 (create: False, clean: False)
Traceback (most recent call last):
    File "platforms/js/build_js.py", line 215, in <module>
builder = Builder(args)
    File "platforms/js/build_js.py", line 84, in __init__
        self.emcc_version = determine_emcc_version(self.emscripten_dir)
    File "platforms/js/build_js.py", line 63, in determine_emcc_version
        m = re.match(r'^emcc.*(\d+\.\d+\.\d+)', ret, flags=re.IGNORECASE)
    File "C:\Users\ckws\AppData\Local\Programs\Python\Python37-32\lib\re.py", line 173, in match
        return _compile(pattern, flags).match(string)
TypeError: cannot use a string pattern on a bytes-like object

如何纠正此错误并构建我的js文件?

谢谢!

0 个答案:

没有答案