Hi jakaskerl

Many thanks for suggesting to use chatgpt. It seemed to give sensible tips to clear the pip cache and remove temporary files. However, even after trying out the steps it suggested, I still get the same error. Further, I tried it with a slightly older python version 3.11.7 as well (I was using 3.11.9 before), but that gave the same error as well.

So sorry for the links that did not work earlier. I have now uploaded the full terminal output (with virtual environment running python v3.11.9) as a github gist. See file below. Hope this helps shed more light on the issue. Please let me know your thoughts. The link to download it should be at the bottom:

Hi @abhanupr
Ah, it's x86 mac, missed it before.
Latest supported version for X86 macos is 2.25.0.0. You can try to build it from source but I can't say whether it will work.

Thanks,
Jaka

    Hi jakaskerl

    Thanks for the reply.

    No it is x86_64. I checked online and that means the macOS is 64-bit. It seems we can run both 32-bit and 64-bit applications on it. So I don't think it is a problem with that.

    Best,

    AB

      abhanupr
      By x86 I mean the architecture (meaning not ARM which new M* macs are). I did also talk with the dev and the missing wheels for x86 MacOS are actually our mistake. The platform should still be supported (will be on Monday).

      Thanks,
      Jaka

        Hi jakaskerl

        Many thanks for the clarification, and for talking with the dev.

        I will wait for the x86 support on Monday (3 June). Please could you let me know when it is supported and I could then try to install depthai again on my Macbook?

        Best,
        AB

        Hi jakaskerl

        Thank you so much for the support! I was able to install depthai and depthai-viewer.

        However, I was not able to run the depthai-viewer. When I run it using python3 -m depthai_viewer I get the following output on the depthai-viewer screen that says "Installing dependencies". From the log I am guessing depthai-viewer tries to install its own version of depthai and fails again because it is trying to install from the wrong wheel? But then why could it not use the already installed version? Please could you let me know the answer to these, and also how to install depthai-viewer in my case?

        Requirement already satisfied: pip in ./depthaiVenv/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0/lib/python3.11/site-packages (24.0)
        Looking in indexes: https://pypi.org/simple, https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
        Collecting depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712
          Using cached https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai-sdk/depthai_sdk-1.13.1.dev0%2Bdd1a6d8a797107d24b9b91b7b63c3fcffb932712-py3-none-any.whl (225 kB)
        Collecting opencv-contrib-python>4 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached opencv_contrib_python-4.10.0.82-cp37-abi3-macosx_12_0_x86_64.whl.metadata (20 kB)
        Collecting blobconverter>=1.4.1 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached blobconverter-1.4.3-py3-none-any.whl.metadata (7.8 kB)
        Collecting pytube>=12.1.0 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached pytube-15.0.0-py3-none-any.whl.metadata (5.0 kB)
        Collecting depthai (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached depthai-2.26.0.0.tar.gz (446 kB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
          Getting requirements to build wheel: started
          Getting requirements to build wheel: finished with status 'done'
          Preparing metadata (pyproject.toml): started
          Preparing metadata (pyproject.toml): finished with status 'done'
        Collecting PyTurboJPEG==1.6.4 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached PyTurboJPEG-1.6.4-py3-none-any.whl
        Collecting marshmallow==3.17.0 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached marshmallow-3.17.0-py3-none-any.whl.metadata (7.8 kB)
        Collecting xmltodict (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached xmltodict-0.13.0-py2.py3-none-any.whl.metadata (7.7 kB)
        Collecting sentry-sdk==1.21.0 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached sentry_sdk-1.21.0-py2.py3-none-any.whl.metadata (8.6 kB)
        Collecting depthai-pipeline-graph==0.0.5 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl.metadata (8.8 kB)
        Collecting ahrs==0.3.1 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached AHRS-0.3.1-py3-none-any.whl.metadata (13 kB)
        Collecting numpy>=1.21 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl.metadata (61 kB)
        Collecting Qt.py>=1.3.0 (from depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached Qt.py-1.4.1-py2.py3-none-any.whl.metadata (29 kB)
        Collecting packaging>=17.0 (from marshmallow==3.17.0->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached packaging-24.0-py3-none-any.whl.metadata (3.2 kB)
        Collecting certifi (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached certifi-2024.6.2-py3-none-any.whl.metadata (2.2 kB)
        Collecting urllib3>=1.26.11 (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
        Collecting requests (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
        Collecting PyYAML (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (2.1 kB)
        Collecting types-PySide2 (from Qt.py>=1.3.0->depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached types_pyside2-5.15.2.1.7-py2.py3-none-any.whl.metadata (8.1 kB)
        Collecting charset-normalizer<4,>=2 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl.metadata (33 kB)
        Collecting idna<4,>=2.5 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
          Using cached idna-3.7-py3-none-any.whl.metadata (9.9 kB)
        Using cached AHRS-0.3.1-py3-none-any.whl (197 kB)
        Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl (123 kB)
        Using cached marshmallow-3.17.0-py3-none-any.whl (48 kB)
        Using cached sentry_sdk-1.21.0-py2.py3-none-any.whl (199 kB)
        Using cached blobconverter-1.4.3-py3-none-any.whl (10 kB)
        Using cached numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl (20.6 MB)
        Using cached opencv_contrib_python-4.10.0.82-cp37-abi3-macosx_12_0_x86_64.whl (66.3 MB)
        Using cached pytube-15.0.0-py3-none-any.whl (57 kB)
        Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
        Using cached packaging-24.0-py3-none-any.whl (53 kB)
        Using cached Qt.py-1.4.1-py2.py3-none-any.whl (35 kB)
        Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
        Using cached certifi-2024.6.2-py3-none-any.whl (164 kB)
        Using cached PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl (187 kB)
        Using cached requests-2.32.3-py3-none-any.whl (64 kB)
        Using cached charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl (121 kB)
        Using cached idna-3.7-py3-none-any.whl (66 kB)
        Using cached types_pyside2-5.15.2.1.7-py2.py3-none-any.whl (572 kB)
        Building wheels for collected packages: depthai
          Building wheel for depthai (pyproject.toml): started
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): still running...
          Building wheel for depthai (pyproject.toml): finished with status 'error'
        Failed to build depthai
        Creating virtual environment...
        Error occurred during dependency installation: Command '['<PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0/bin/python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
        Traceback (most recent call last):
          File "<PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/install_requirements.py", line 88, in create_venv_and_install_dependencies
            subprocess.run(
          File "/usr/local/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
            raise CalledProcessError(retcode, process.args,
        subprocess.CalledProcessError: Command '['<PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0/bin/python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
        
        Deleting partially created virtual environment: <PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0

        Hi @abhanupr
        Correct. There is no automatic way to do it (we'll be adding it in the future).

        # Get the location in site-packages
        pip show depthai-viewer
        # /home/filip/.local/lib/python3.10/site-packages
        rm -rf /home/filip/.local/lib/python3.10/site-packages/depthai_viewer/venv-0.2.0/
        # Swap the depthai version in: /home/filip/.local/lib/python3.10/site-packages/depthai_viewer/requirements.txt

        Thanks,
        Jaka

          Hi jakaskerl

          Many thanks for the workaround. I tried it by modifying the requirements.txt file as follows:

          numpy>=1.23
          pyarrow==16.0.0
          setuptools
          ahrs
          # depthai_sdk conflicts with depthai, so it's installed seperatelly in __main__.py
          --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
          depthai==2.26.0.0.dev+75438dcaa5b8b28005b6fc5077ab62e435884e83
          websockets
          pydantic==1.9
          deprecated
          sentry-sdk

          However, I am still getting the same error (see below) when I run depthai-viewer. May be I am doing something wrong, please let me know.

          Requirement already satisfied: pip in ./depthaiVenv/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0/lib/python3.11/site-packages (24.0)
          Looking in indexes: https://pypi.org/simple, https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
          Collecting depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712
            Using cached https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai-sdk/depthai_sdk-1.13.1.dev0%2Bdd1a6d8a797107d24b9b91b7b63c3fcffb932712-py3-none-any.whl (225 kB)
          Collecting opencv-contrib-python>4 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached opencv_contrib_python-4.10.0.82-cp37-abi3-macosx_12_0_x86_64.whl.metadata (20 kB)
          Collecting blobconverter>=1.4.1 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached blobconverter-1.4.3-py3-none-any.whl.metadata (7.8 kB)
          Collecting pytube>=12.1.0 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached pytube-15.0.0-py3-none-any.whl.metadata (5.0 kB)
          Collecting depthai (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached depthai-2.26.0.0.tar.gz (446 kB)
            Installing build dependencies: started
            Installing build dependencies: finished with status 'done'
            Getting requirements to build wheel: started
            Getting requirements to build wheel: finished with status 'done'
            Preparing metadata (pyproject.toml): started
            Preparing metadata (pyproject.toml): finished with status 'done'
          Collecting PyTurboJPEG==1.6.4 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached PyTurboJPEG-1.6.4-py3-none-any.whl
          Collecting marshmallow==3.17.0 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached marshmallow-3.17.0-py3-none-any.whl.metadata (7.8 kB)
          Collecting xmltodict (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached xmltodict-0.13.0-py2.py3-none-any.whl.metadata (7.7 kB)
          Collecting sentry-sdk==1.21.0 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached sentry_sdk-1.21.0-py2.py3-none-any.whl.metadata (8.6 kB)
          Collecting depthai-pipeline-graph==0.0.5 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl.metadata (8.8 kB)
          Collecting ahrs==0.3.1 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached AHRS-0.3.1-py3-none-any.whl.metadata (13 kB)
          Collecting numpy>=1.21 (from depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl.metadata (61 kB)
          Collecting Qt.py>=1.3.0 (from depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached Qt.py-1.4.1-py2.py3-none-any.whl.metadata (29 kB)
          Collecting packaging>=17.0 (from marshmallow==3.17.0->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached packaging-24.0-py3-none-any.whl.metadata (3.2 kB)
          Collecting certifi (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached certifi-2024.6.2-py3-none-any.whl.metadata (2.2 kB)
          Collecting urllib3>=1.26.11 (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
          Collecting requests (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
          Collecting PyYAML (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (2.1 kB)
          Collecting types-PySide2 (from Qt.py>=1.3.0->depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached types_pyside2-5.15.2.1.7-py2.py3-none-any.whl.metadata (8.1 kB)
          Collecting charset-normalizer<4,>=2 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl.metadata (33 kB)
          Collecting idna<4,>=2.5 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712)
            Using cached idna-3.7-py3-none-any.whl.metadata (9.9 kB)
          Using cached AHRS-0.3.1-py3-none-any.whl (197 kB)
          Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl (123 kB)
          Using cached marshmallow-3.17.0-py3-none-any.whl (48 kB)
          Using cached sentry_sdk-1.21.0-py2.py3-none-any.whl (199 kB)
          Using cached blobconverter-1.4.3-py3-none-any.whl (10 kB)
          Using cached numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl (20.6 MB)
          Using cached opencv_contrib_python-4.10.0.82-cp37-abi3-macosx_12_0_x86_64.whl (66.3 MB)
          Using cached pytube-15.0.0-py3-none-any.whl (57 kB)
          Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
          Using cached packaging-24.0-py3-none-any.whl (53 kB)
          Using cached Qt.py-1.4.1-py2.py3-none-any.whl (35 kB)
          Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
          Using cached certifi-2024.6.2-py3-none-any.whl (164 kB)
          Using cached PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl (187 kB)
          Using cached requests-2.32.3-py3-none-any.whl (64 kB)
          Using cached charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl (121 kB)
          Using cached idna-3.7-py3-none-any.whl (66 kB)
          Using cached types_pyside2-5.15.2.1.7-py2.py3-none-any.whl (572 kB)
          Building wheels for collected packages: depthai
            Building wheel for depthai (pyproject.toml): started
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): still running...
            Building wheel for depthai (pyproject.toml): finished with status 'error'
          Failed to build depthai
          Creating virtual environment...
          Error occurred during dependency installation: Command '['<PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0/bin/python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
          Traceback (most recent call last):
            File "<PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/install_requirements.py", line 88, in create_venv_and_install_dependencies
              subprocess.run(
            File "/usr/local/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
              raise CalledProcessError(retcode, process.args,
          subprocess.CalledProcessError: Command '['<PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0/bin/python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+dd1a6d8a797107d24b9b91b7b63c3fcffb932712', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
          
          Deleting partially created virtual environment: <PATH_TO_VENV>/lib/python3.11/site-packages/depthai_viewer/venv-0.2.0

            abhanupr
            Then try

            pip show depthai_viewer
            # Location: /Users/jaka/miniconda3/envs/sdk/lib/python3.11/site-packages
            source /Users/jaka/miniconda3/envs/sdk/lib/python3.11/site-packages/depthai_viewer/venv-0.1.8/bin/activate
            pip install --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ depthai==2.26.0.0.dev+75438dcaa5b8b28005b6fc5077ab62e435884e83

            Thanks,
            Jaka

              15 days later

              jakaskerl

              Thank you very much. I didn't try the viewer yet, but I am happy with the depthai examples for now.

              Awesome support! Keep it up.

              Best,
              AB