Dear DepthAI Experts,
Hello.
I would like to get my hands on the depthai library.
I install it with pip.
I used a new PC (windows 11) and followed the following site.
https://docs.luxonis.com/projects/api/en/latest/install/#windows-10
Here are the steps I followed
Choose Windows PowerShell (Admin) and run the following:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Close the PowerShell and then re-open another PowerShell (Admin) by repeating the first two steps.
Install Python and PyCharm
choco install cmake git python pycharm-community -y
thereafter
Enter the command in Windows PowerShell (Admin)
python -m pip install depthai
However, I get the following error. I do not know how to resolve the error.
Am I missing a step?
Also, is there a solution to the above error?
PS C:\Windows\system32> python -m pip install depthai
Collecting depthai
Using cached depthai-2.24.0.0.tar.gz (434 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: depthai
Building wheel for depthai (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for depthai (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [75 lines of output]
running bdist_wheel
running build
running build_ext
<string>:87: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:38 (project):
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/yasukawalabuser/AppData/Local/Temp/pip-install-lc98cr1s/depthai_f949436199314369b3f1abc7f47460cb/build/temp.win-amd64-cpython-312/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "C:\\Python312\\Lib\\site-packages\\pip\\_vendor\\pyproject_hooks\\_in_process\\_in_process.py", line 353, in <module>
main()
File "C:\\Python312\\Lib\\site-packages\\pip\\_vendor\\pyproject_hooks\\_in_process\\_in_process.py", line 335, in main
json_out['return_val'] = hook(\*\*hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\\Python312\\Lib\\site-packages\\pip\\_vendor\\pyproject_hooks\\_in_process\\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\build_meta.py", line 404, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\build_meta.py", line 389, in _build_with_temp_dir
self.run_setup()
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 198, in <module>
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\__init__.py", line 103, in setup
return distutils.core.setup(\*\*attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\core.py", line 201, in run_commands
dist.run_commands()
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\dist.py", line 963, in run_command
super().run_command(command)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\wheel\\bdist_wheel.py", line 368, in run
self.run_command("build")
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\dist.py", line 963, in run_command
super().run_command(command)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\command\\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\dist.py", line 963, in run_command
super().run_command(command)
File "C:\\Users\\yasukawalabuser\\AppData\\Local\\Temp\\pip-build-env-rmvqpwdy\\overlay\\Lib\\site-packages\\setuptools\\_distutils\\dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 92, in run
File "<string>", line 195, in build_extension
File "C:\\Python312\\Lib\\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\\\Users\\\\yasukawalabuser\\\\AppData\\\\Local\\\\Temp\\\\pip-install-lc98cr1s\\\\depthai_f949436199314369b3f1abc7f47460cb', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\\\Users\\\\yasukawalabuser\\\\AppData\\\\Local\\\\Temp\\\\pip-install-lc98cr1s\\\\depthai_f949436199314369b3f1abc7f47460cb\\\\build\\\\lib.win-amd64-cpython-312\\\\', '-DPYTHON_EXECUTABLE=C:\\\\Python312\\\\python.exe', '-DCMAKE_BUILD_TYPE=Release', '-DHUNTER_CONFIGURATION_TYPES=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\\\Users\\\\yasukawalabuser\\\\AppData\\\\Local\\\\Temp\\\\pip-install-lc98cr1s\\\\depthai_f949436199314369b3f1abc7f47460cb\\\\build\\\\lib.win-amd64-cpython-312\\\\', '-DCMAKE_TOOLCHAIN_FILE=C:\\\\Users\\\\yasukawalabuser\\\\AppData\\\\Local\\\\Temp\\\\pip-install-lc98cr1s\\\\depthai_f949436199314369b3f1abc7f47460cb/cmake/toolchain/msvc.cmake', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for depthai
Failed to build depthai
ERROR: Could not build wheels for depthai, which is required to install pyproject.toml-based projects