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

  • jakaskerl replied to this.
  • Hi Syun
    Uh, sorry, I was sure you had python 3.9. We don't currently support python 3.12 (that said I, it should be supported soon). That's why you can't install it in the first place. I suggest using python 3.11.

    If you get similar error, then this wheel (for 3.11) should install just fine.

    Sorry for the confusion.

    EDIT: We added python3.12 to supported versions. It should now work. The wheel for the 3.12 version will be available in the artifactory shortly.

    Thanks,
    Jaka

    Thank you for answering .

    I don't know how to download this pre-built wheel.

    Should I download it with pip or git?

    Should I put it in a specific file somewhere?

    I ran this code.

    pip install depthai-0.0.2.1+00ca3534d2e92af2b8e3aff9a8e5bc96b6bb1993-cp35-cp35m-win_amd64.whl

    And this error occurred.

    WARNING: Requirement 'depthai-0.0.2.1+00ca3534d2e92af2b8e3aff9a8e5bc96b6bb1993-cp35-cp35m-win_amd64.whl' looks like a filename, but the file does not exist

    ERROR: depthai-0.0.2.1+00ca3534d2e92af2b8e3aff9a8e5bc96b6bb1993-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

    python version is 3.12.

    Please tell me how to choose wheels.

      4 days later

      Hi Syun
      You must download the .whl file. The you can install it using pip install [wheel file name].

      Thanks,
      Jaka

      • Syun replied to this.

        jakaskerl

        Excuse me, I ran the code below and got an error.

        pip install https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai/depthai-2.24.0.0.dev0+855e0208361d60ad250bc83ae64ce7d44e23140d-cp39-cp39-win_amd64.whl

        The error content looks like this:

        ERROR: depthai-2.24.0.0.dev0+855e0208361d60ad250bc83ae64ce7d44e23140d-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

        Do you know what caused the error?

          Hi Syun
          Uh, sorry, I was sure you had python 3.9. We don't currently support python 3.12 (that said I, it should be supported soon). That's why you can't install it in the first place. I suggest using python 3.11.

          If you get similar error, then this wheel (for 3.11) should install just fine.

          Sorry for the confusion.

          EDIT: We added python3.12 to supported versions. It should now work. The wheel for the 3.12 version will be available in the artifactory shortly.

          Thanks,
          Jaka

          • Syun replied to this.

            I had the same problem as @Syun on Windows 11/Python 3.12. Fixed by downgrading to Python 3.11, 3.12 not supported for me @jakaskerl