google-coral / coralmicro

Source code for Coral Dev Board Micro
Apache License 2.0
106 stars 44 forks source link

Issue in Getting Started setup instructions #112

Closed antypko closed 5 months ago

antypko commented 5 months ago

Description

Following this guide for setup: https://coral.ai/docs/dev-board-micro/get-started/#4-set-up-for-freertos-development

During installation of hadapi package I am getting error

` Building wheels for collected packages: hidapi Building wheel for hidapi (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for hidapi (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [9 lines of output] running bdist_wheel running build running build_ext /tmp/pip-build-env-7e90pekj/normal/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-j42sjbel/hidapi_cd8aaa6e4b7a4a2eae2de0f3bc0cdbf3/hid.pyx tree = Parsing.p_module(s, pxd, full_module_name) Compiling hid.pyx because it changed. [1/1] Cythonizing hid.pyx building 'hid' extension error: unknown file type '.pxd' (from 'chid.pxd') [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hidapi Failed to build hidapi ERROR: Could not build wheels for hidapi, which is required to install pyproject.toml-based projects ` I am using Raspberry Pi 5 as development station and have installed python 3.11.2

Click to expand! ### Issue Type Build/Install ### Operating System Linux ### Coral Device Dev Board Micro ### Other Devices _No response_ ### Programming Language Other ### Relevant Log Output ```shell Hit:1 http://deb.debian.org/debian bookworm InRelease Hit:2 http://archive.raspberrypi.com/debian bookworm InRelease Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease Hit:4 http://deb.debian.org/debian bookworm-updates InRelease Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done make is already the newest version (4.3-4.1). cmake is already the newest version (3.25.1-1). libhidapi-hidraw0 is already the newest version (0.13.1-1). libusb-1.0-0-dev is already the newest version (2:1.0.26-1). libudev-dev is already the newest version (252.22-1~deb12u1). python3-dev is already the newest version (3.11.2-1+b1). python3-pip is already the newest version (23.0.1+dfsg-1+rpt1). 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. upgrading pip Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: pip in ./.venv/lib/python3.11/site-packages (23.0.1) Collecting pip Using cached https://www.piwheels.org/simple/pip/pip-24.0-py3-none-any.whl (2.1 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 23.0.1 Uninstalling pip-23.0.1: Successfully uninstalled pip-23.0.1 Successfully installed pip-24.0 installing requirements Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting hexformat==0.2 (from -r /home/sviatoslavchetyrkin/coral/coralmicro/scripts/requirements.txt (line 1)) Using cached https://www.piwheels.org/simple/hexformat/hexformat-0.2-py3-none-any.whl (50 kB) Collecting hidapi==0.11.2 (from -r /home/sviatoslavchetyrkin/coral/coralmicro/scripts/requirements.txt (line 2)) Using cached hidapi-0.11.2.tar.gz (144 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting progress==1.5 (from -r /home/sviatoslavchetyrkin/coral/coralmicro/scripts/requirements.txt (line 3)) Using cached https://www.piwheels.org/simple/progress/progress-1.5-py3-none-any.whl (9.5 kB) Collecting pyserial==3.5 (from -r /home/sviatoslavchetyrkin/coral/coralmicro/scripts/requirements.txt (line 4)) Using cached https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB) Collecting pyusb==1.2.0 (from -r /home/sviatoslavchetyrkin/coral/coralmicro/scripts/requirements.txt (line 5)) Using cached https://www.piwheels.org/simple/pyusb/pyusb-1.2.0-py3-none-any.whl (58 kB) Requirement already satisfied: setuptools>=19.0 in ./.venv/lib/python3.11/site-packages (from hidapi==0.11.2->-r /home/sviatoslavchetyrkin/coral/coralmicro/scripts/requirements.txt (line 2)) (66.1.1) Building wheels for collected packages: hidapi Building wheel for hidapi (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for hidapi (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [9 lines of output] running bdist_wheel running build running build_ext /tmp/pip-build-env-g9ahs3l4/normal/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-jbq498o8/hidapi_bd801fc7800443fe8a8a312b30e6b4ac/hid.pyx tree = Parsing.p_module(s, pxd, full_module_name) Compiling hid.pyx because it changed. [1/1] Cythonizing hid.pyx building 'hid' extension error: unknown file type '.pxd' (from 'chid.pxd') [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hidapi Failed to build hidapi ERROR: Could not build wheels for hidapi, which is required to install pyproject.toml-based projects ```
freedomlives commented 5 months ago

What worked for me, is in the folder scripts, edit requirements.txt by changing the second line to: hidapi==0.14.0

antypko commented 5 months ago

Thank you)

google-coral-bot[bot] commented 5 months ago

Are you satisfied with the resolution of your issue? Yes No