Skip to content

Compiling openCV #306

Closed
Closed
@asknask

Description

@asknask

I was following the directions given in another thread here (#126 (comment)).

  • I installed Git.
  • I cloned this repo
  • I cloned the OpenCV repo
  • I copied the files from the OpenCV repo into the opencv folder of this repo
  • I set a temporary environment variable as mentioned (set CMAKE_ARGS "-DOPENCV_ENABLE_NONFREE=ON")
  • I then executed the python code from this repository as mentioned

I'm getting the following error now:

python setup.py bdist_wheel
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
  File "setup.py", line 397, in <module>
    main()
  File "setup.py", line 64, in main
    package_version = get_opencv_version()
  File "setup.py", line 351, in get_opencv_version
    runpy.run_path("find_version.py")
  File "C:\Program Files\Python38\lib\runpy.py", line 263, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "C:\Program Files\Python38\lib\runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "C:\Program Files\Python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "find_version.py", line 26, in <module>
    git_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).splitlines()[0].decode()
  File "C:\Program Files\Python38\lib\subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Program Files\Python38\lib\subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'rev-parse', '--short', 'HEAD']' returned non-zero exit status 128.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions