• DepthAI-v2
  • nmake missing while following Windows install instruction

I have been trying to install depthai python dependencies to run python script of depthai on Windows.

I have done

choco install cmake git python pycharm-community -y

and when i reach the instruction

python -m pip install depthai

I have the nmake error. What should I do? Do I have to install the Windows SDK as some ppl suggested on the net? It it seems huge though.

How do I use NMAKE on the command line? - Stack Overflow

c - Error while configuring CMake project: Running 'nmake' '-?' failed - Stack Overflow

PS C:\Windows\system32> python -m pip install depthai
Collecting depthai
  Downloading depthai-2.23.0.0.tar.gz (421 kB)
     ---------------------------------------- 421.4/421.4 kB 4.4 MB/s eta 0:00:00
  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
  ╰─> [88 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:2 (project):
        Running

         'nmake' '-?'

        failed with:

         The system cannot find the file specified



      [hunter ** INTERNAL **] Configure project failed.

    Hi Huimin
    If you have problems running the manual approach I would recommend you use our installer instead. Should download and install any required packages along with depthai-viewer.

    thanks,
    Jaka

      Hi jakaskerl

      Thanks for your reply. Yes I did try the installer, however it seems not installying the dependencies to the system Python. Im trying to do it on system python so i can be used alongside other python packages we need.

      What should be done in this case? How do I use the installers' own python env? Thanks!

        Hi Huimin
        GPT:

        The error you're encountering when trying to install depthai on a Windows machine indicates a problem with CMake being able to invoke nmake. Here are several steps you can take to troubleshoot and resolve this issue:

        • Visual Studio Build Tools: Ensure that you have the Visual Studio Build Tools installed. nmake is part of these build tools, which are required for compiling C++ code on Windows. It's not sufficient to have just CMake; you need the build tools that CMake will call to compile the code.

        • Windows SDK: The Windows SDK may indeed be necessary because it includes the compilers and libraries needed to build C++ applications. While it is large, it is often a required component for building native extensions.

        • Environment Path: Once you have installed the Visual Studio Build Tools, ensure that the path to nmake is in your system's PATH environment variable. This is necessary so that CMake can find nmake.

        • Run as Administrator: Sometimes, installing certain packages may require administrative privileges. Try running your command prompt as an administrator and then attempt the installation again.

        Could you check those please. In the meantime, I'll check with the team. Perhaps the installation docs need to be updated.

        Thanks,
        Jaka

          jakaskerl

          Hi Jaka,

          I have tried the Windows installer again, the version it carries is quite old, which is v2.20.2, now the latest should be v2.23. I couldn't use it properly for some features as it is dated. Could the team help update the installer quickly.

          I figured out to use the installed version, I have to run the python within `AppData\Local\Programs\DepthAI\venv\Scripts\python.exe`

          7 days later

          Hi Huimin
          The installer should install 2.21.2.0 version as specified in the requirements.txt. You can edit that one with 2.23.0 to install the newest version.
          We currently use 2.21.2 since it's been tested and is less prone to issues - which is better for new users.

          If you have problems running the demo after that, you can use --skipVersionCheck flag to run it.

          Thanks,
          Jaka

          3 months later

          Hello,
          I have the same issue. The demo works if I use the installer, but I cannot install the library to run my custom application. I have installed the Visual Studio Build Tools. That did not help. I'm a bit hesitant to install Windows SDK as well. Would you still recommend to try that?

          I cannot really use the method Huimin pointed out with using the python.exe in that folder since I want to build a custom application that will run with startup.

          Thanks,

          Ingur

          Hi @IngurBoettger
          Are you using python3.12 by any chance? Right now you would have to install the wheel directly since pypi does not support depthai for python312 yet.

          Thanks
          Jaka

          11 days later

          Thank you. I wanted to use Python 3.12. Maybe this is why I could not install.

          Actually I made it work with the method from Huimin (using the python.exe in the installation folder). I'd prefer to use a cleaner approach. I might try with Python 3.11

          Hi @IngurBoettger
          We should have depthai==2.25 out sometime today or tomorrow, which will update the pypi repo as well. If you want, you can wait for the update and you should be able to run depthai on python3.12.

          Thanks,
          Jaka