sr99622 / libonvif

Onvif library with GUI implementation and built in YOLOX
GNU Lesser General Public License v2.1
175 stars 45 forks source link

error: [WinError 2] The system cannot find the file specified #87

Closed mriamnobody closed 7 months ago

mriamnobody commented 7 months ago

Platform Details

OS: Windows 11 Python: v3.10.7 libonvif: Latest git cloned as mentioned in building guide for Windows

I'm getting the following error when I try to build libonvif for Windows:

  error: [WinError 2] The system cannot find the file specified
  error: subprocess-exited-with-error

This is the full log of building along with error:

Using pip 22.2.2 from F:\Projects\folder\mmmm\lib\site-packages\pip (python 3.10)
Processing f:\projects\folder\libonvif\libonvif
  Running command pip subprocess to install build dependencies
  Collecting setuptools>=61.0
    Using cached setuptools-69.5.1-py3-none-any.whl (894 kB)
  Installing collected packages: setuptools
  Successfully installed setuptools-69.5.1

  [notice] A new release of pip available: 22.2.2 -> 24.0
  [notice] To update, run: python.exe -m pip install --upgrade pip
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  running egg_info
  creating libonvif.egg-info
  writing libonvif.egg-info\PKG-INFO
  writing dependency_links to libonvif.egg-info\dependency_links.txt
  writing top-level names to libonvif.egg-info\top_level.txt
  writing manifest file 'libonvif.egg-info\SOURCES.txt'
  reading manifest file 'libonvif.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file 'libonvif.egg-info\SOURCES.txt'
  Getting requirements to build wheel ... done
  Running command pip subprocess to install backend dependencies
  Collecting wheel
    Using cached wheel-0.43.0-py3-none-any.whl (65 kB)
  Installing collected packages: wheel
  Successfully installed wheel-0.43.0

  [notice] A new release of pip available: 22.2.2 -> 24.0
  [notice] To update, run: python.exe -m pip install --upgrade pip
  Installing backend dependencies ... done
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif.egg-info
  writing C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif.egg-info\PKG-INFO
  writing dependency_links to C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif.egg-info\dependency_links.txt
  writing top-level names to C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif.egg-info\top_level.txt
  writing manifest file 'C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif.egg-info\SOURCES.txt'
  reading manifest file 'C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file 'C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif.egg-info\SOURCES.txt'
  creating 'C:\Users\rosha\AppData\Local\Temp\pip-modern-metadata-mhjb07m_\libonvif-3.1.1.dist-info'
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: libonvif
  Running command Building wheel for libonvif (pyproject.toml)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-310
  creating build\lib.win-amd64-cpython-310\libonvif
  copying libonvif\__init__.py -> build\lib.win-amd64-cpython-310\libonvif
  running egg_info
  writing libonvif.egg-info\PKG-INFO
  writing dependency_links to libonvif.egg-info\dependency_links.txt
  writing top-level names to libonvif.egg-info\top_level.txt
  reading manifest file 'libonvif.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file 'libonvif.egg-info\SOURCES.txt'
  copying libonvif\libxml2.dll -> build\lib.win-amd64-cpython-310\libonvif
  copying libonvif\msvcp140.dll -> build\lib.win-amd64-cpython-310\libonvif
  copying libonvif\vcruntime140.dll -> build\lib.win-amd64-cpython-310\libonvif
  running build_ext
  error: [WinError 2] The system cannot find the file specified
  error: subprocess-exited-with-error

  × Building wheel for libonvif (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: 'F:\Projects\folder\mmmm\Scripts\python.exe' 'F:\Projects\folder\mmmm\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\rosha\AppData\Local\Temp\tmpahd9nt34'
  cwd: F:\Projects\folder\libonvif\libonvif
  Building wheel for libonvif (pyproject.toml) ... error
  ERROR: Failed building wheel for libonvif
Failed to build libonvif
ERROR: Could not build wheels for libonvif, which is required to install pyproject.toml-based projects
mriamnobody commented 7 months ago

This error was due to absence of cmake. I thought had it installed. The error went away after installing cmake. I apologize for any confusion or inconvenience