Hi, step 9.4 of the prerequisites, "Install SPSDK from Github into your Python virtual environment" did not complete entirely successfully. Error report below (the rest completed successfully).
Subsequently visiting the indicated resource, "", does not lead to an installer/updater that resolves the problem.
Is this error relevant, or can be ignored?
If relevant, can you recommend the proper steps / resources to resolve?
Kind regards,
Nic
======
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
╰─> [5 lines of output]
running bdist_wheel
running build
running build_ext
building 'hid' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for hidapi
Building wheel for intervaltree (pyproject.toml) ... done
Created wheel for intervaltree: filename=intervaltree-3.1.0-py2.py3-none-any.whl size=26129 sha256=03e2d1cf4516f09c68b965fd26a76bfa0ca8450cce467b67759ac55efb1e4a20
Stored in directory: c:\users\usb01768\appdata\local\pip\cache\wheels\a7\d2\99\50f53015b573c9b65ff643d7f213fc7784dad87976e79cf02c
Building wheel for libusb-package (pyproject.toml) ... done
Created wheel for libusb-package: filename=libusb_package-1.0.26.1-cp313-cp313-win_amd64.whl size=11243 sha256=b76bb6e378419ff5acb04eef4a12b9bc989c952160682598940c70cdd84c1e96
Stored in directory: c:\users\usb01768\appdata\local\pip\cache\wheels\c3\30\76\064835ee8612440a48aa95ca11bf15b48732eb094455d9753b
Successfully built crcmod hexdump intervaltree libusb-package
Failed to build hidapi
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (hidapi)
Solved! Go to Solution.
Hello Nic,
I had the same error during SPSDK installation and I also installed Microsoft Visual C++ manually, then it was solved.
Did you install the C++ x64/x86 build tools and Windows SDK as indicated in this link?
Below is a screenshot from the options I selected in the Visual Studio Build tools installer (Windows 10 SDK in my case):
Regards!
Jorge Gonzalez
HI,
i am trying to install spsdk using termux in android device.
I need to do following , but i am getting error in pip install spsdk.
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install spsdk
spsdk --helpPython 3.11/3.12 i have used
Below is the error logs
creating build/lib.linux-aarch64-cpython-312 aarch64-linux-android-clang -shared -L/data/data/com.termux/files/usr/lib -Wl,-rpath=/data/data/com.termux/files/usr/lib -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now -L/home/builder/.termux-build/_cache/android-r27c-api-29-v1/sysroot/usr/lib -landroid-posix-semaphore -L/data/data/com.termux/files/usr/lib -Wl,-rpath=/data/data/com.termux/files/usr/lib -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-z,relro,-z,now -L/home/builder/.termux-build/_cache/android-r27c-api-29-v1/sysroot/usr/lib -landroid-posix-semaphore -L/data/data/com.termux/files/usr/lib -I/data/data/com.termux/files/usr/include build/temp.linux-aarch64-cpython-312/data/data/com.termux/files/usr/tmp/pip-install-3hxa6dzn/hidapi_d4d62c469c714bb59c7a3a480390d50d/hidapi/libusb/hid.o build/temp.linux-aarch64-cpython-312/hid.o -L/data/data/com.termux/files/usr/lib -lpython3.12 -o build/lib.linux-aarch64-cpython-312/hid.cpython-312.so -L/data/data/com.termux/files/usr/lib -lusb-1.0 building 'hidraw' extension creating build/temp.linux-aarch64-cpython-312/data/data/com.termux/files/usr/tmp/pip-install-3hxa6dzn/hidapi_d4d62c469c714bb59c7a3a480390d50d/hidapi/linux aarch64-linux-android-clang -I/data/data/com.termux/files/usr/include -fPIC -I/data/data/com.termux/files/usr/tmp/pip-install-3hxa6dzn/hidapi_d4d62c469c714bb59c7a3a480390d50d/hidapi/hidapi -I/data/data/com.termux/files/home/gitclone/spsdk/venv/include -I/data/data/com.termux/files/usr/include/python3.12 -c /data/data/com.termux/files/usr/tmp/pip-install-3hxa6dzn/hidapi_d4d62c469c714bb59c7a3a480390d50d/hidapi/linux/hid.c -o build/temp.linux-aarch64-cpython-312/data/data/com.termux/files/usr/tmp/pip-install-3hxa6dzn/hidapi_d4d62c469c714bb59c7a3a480390d50d/hidapi/linux/hid.o /data/data/com.termux/files/usr/tmp/pip-install-3hxa6dzn/hidapi_d4d62c469c714bb59c7a3a480390d50d/hidapi/linux/hid.c:43:10: fatal error: 'libudev.h' file not found 43 | #include | ^~~~~~~~~~~ 1 error generated. error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hidapi Building wheel for capstone (pyproject.toml) ... done Created wheel for capstone: filename=capstone-4.0.2-py3-none-manylinux1_aarch64.whl size=1947339 sha256=52c4141d7bf6709974e63d0e1ca2ecff326ff11d88c4f5f9a61673ccaa636195 Stored in directory: /data/data/com.termux/files/home/.cache/pip/wheels/2c/47/7d/26ac37a0891d4419d695bfef1373ce2d68050b5cfdcc108dc1 Building wheel for cmsis-pack-manager (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for cmsis-pack-manager (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [140 lines of output] Running `maturin pep517 build-wheel -i /data/data/com.termux/files/home/gitclone/spsdk/venv/bin/python --compatibility off`
Hi,
I am not really familiar with Termux, I know that SPSDK is supported on Ubuntu 22.04.1 LTS, I am not sure if this is compatible with the linux running on Termux.
Do you know the OS version running on Termux?
Regards
Daniel Martinez
(venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ termux-info Termux Variables: TERMUX_EXEC__PROC_SELF_EXE=/data/data/com.termux/files/usr/bin/termux-info TERMUX_VERSION=googleplay.2025.01.18 TERMUX__USER_ID=0 Packages CPU architecture: aarch64 Subscribed repositories: URIs: https://root-packages.termux.net/ URIs: https://termux.net URIs: https://tur.kcubeterm.com URIs: https://x11-packages.termux.net/ Updatable packages: clang/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1] command-not-found/stable 2.4.0-78 aarch64 [upgradable from: 2.4.0-74] curl/stable 8.14.1 aarch64 [upgradable from: 8.13.0] glib/stable 2.84.2 aarch64 [upgradable from: 2.84.1-3] libarchive/stable 3.8.1 aarch64 [upgradable from: 3.7.9-1] libcompiler-rt/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1] libcurl/stable 8.14.1 aarch64 [upgradable from: 8.13.0] libdevmapper/root 2.03.32 aarch64 [upgradable from: 2.03.31]libgcrypt/stable 1.11.1 aarch64 [upgradable from: 1.11.0] libidn2/stable 2.3.8 aarch64 [upgradable from: 2.3.7] libllvm/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1] libnghttp3/stable 1.10.1 aarch64 [upgradable from: 1.9.0] libsqlite/stable 3.49.2 aarch64 [upgradable from: 3.49.1-2] libunbound/stable 1.23.0-1 aarch64 [upgradable from: 1.23.0]libusb/stable 1.0.29 aarch64 [upgradable from: 1.0.28] libxml2/stable 2.14.3 aarch64 [upgradable from: 2.14.2-1] lld/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1] llvm/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1] mesa-vulkan-icd-swrast/stable 25.1.2 aarch64 [upgradable from: 25.0.5] mesa/stable 25.1.2 aarch64 [upgradable from: 25.0.5] openssh-sftp-server/stable 10.0p2-7 aarch64 [upgradable from: 10.0p2-5] openssh/stable 10.0p2-7 aarch64 [upgradable from: 10.0p2-5] rhash/stable 1.4.6 aarch64 [upgradable from: 1.4.5] runc/root 1.3.0 aarch64 [upgradable from: 1.2.6] rust-std-aarch64-linux-android/stable 1.87.0-1 all [upgradable from: 1.86.0] rust/stable 1.87.0-1 aarch64 [upgradable from: 1.86.0] vulkan-loader-generic/stable 1.4.317 aarch64 [upgradable from: 1.4.313] termux-tools version: 3.0.8 Android version:
15 Kernel build information: Linux localhost 5.4.274-qgki-g4670d6bdb795 #1 SMP PREEMPT Wed Apr 9 21:52:48 CST 2025 aarch64 Android Device manufacturer: Nothing Device model: A063 LD Variables: LD_LIBRARY_PATH= LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so (venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ getprop ro.build.version.release 15 (venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ getprop ro.build.version.release 15 (venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ (venv3.8) ~/gitclone/spsdk $ uname -a Linux localhost 5.4.274-qgki-g4670d6bdb795 #1 SMP PREEMPT Wed Apr 9 21:52:48 CST 2025 aarch64 Android (venv3.8) ~/gitclone/spsdk $
Termux environment is Android 15, with linux kernal version 5.4.274-qgki for aarch64 architecture.
(venv3.8) ~/gitclone/spsdk $ termux-info
Termux Variables: TERMUX_EXEC__PROC_SELF_EXE=/data/data/com.termux/files/usr/bin/termux-info
TERMUX_VERSION=googleplay.2025.01.18
TERMUX__USER_ID=0
Packages CPU architecture: aarch64
Subscribed repositories: URIs: https://root-packages.termux.net/ URIs: https://termux.net URIs: https://tur.kcubeterm.com URIs: https://x11-packages.termux.net/
Updatable packages:
clang/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1] command-not-found/stable 2.4.0-78 aarch64 [upgradable from: 2.4.0-74]
curl/stable 8.14.1 aarch64 [upgradable from: 8.13.0]
glib/stable 2.84.2 aarch64 [upgradable from: 2.84.1-3]
libarchive/stable 3.8.1 aarch64 [upgradable from: 3.7.9-1]
libcompiler-rt/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1]
libcurl/stable 8.14.1 aarch64 [upgradable from: 8.13.0]
libdevmapper/root 2.03.32 aarch64 [upgradable from: 2.03.31]
libgcrypt/stable 1.11.1 aarch64 [upgradable from: 1.11.0]
libidn2/stable 2.3.8 aarch64 [upgradable from: 2.3.7]
libllvm/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1]
libnghttp3/stable 1.10.1 aarch64 [upgradable from: 1.9.0]
libsqlite/stable 3.49.2 aarch64 [upgradable from: 3.49.1-2]
libunbound/stable 1.23.0-1 aarch64 [upgradable from: 1.23.0]
libusb/stable 1.0.29 aarch64 [upgradable from: 1.0.28]
libxml2/stable 2.14.3 aarch64 [upgradable from: 2.14.2-1]
lld/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1]
llvm/stable 20.1.6 aarch64 [upgradable from: 20.1.3-1]
mesa-vulkan-icd-swrast/stable 25.1.2 aarch64 [upgradable from: 25.0.5]
mesa/stable 25.1.2 aarch64 [upgradable from: 25.0.5]
openssh-sftp-server/stable 10.0p2-7 aarch64 [upgradable from: 10.0p2-5]
openssh/stable 10.0p2-7 aarch64 [upgradable from: 10.0p2-5]
rhash/stable 1.4.6 aarch64 [upgradable from: 1.4.5]
runc/root 1.3.0 aarch64 [upgradable from: 1.2.6]
rust-std-aarch64-linux-android/stable 1.87.0-1 all [upgradable from: 1.86.0]
rust/stable 1.87.0-1 aarch64 [upgradable from: 1.86.0]
vulkan-loader-generic/stable 1.4.317 aarch64 [upgradable from: 1.4.313]
termux-tools version: 3.0.8 Android version:
15 Kernel build information: Linux localhost 5.4.274-qgki-g4670d6bdb795 #1 SMP PREEMPT Wed Apr 9 21:52:48 CST 2025 aarch64 Android Device manufacturer: Nothing Device model: A063 LD Variables: LD_LIBRARY_PATH= LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
(venv3.8) ~/gitclone/spsdk $ getprop ro.build.version.release
15
(venv3.8) ~/gitclone/spsdk $ getprop ro.build.version.release
15
(venv3.8) ~/gitclone/spsdk $ uname -a
Linux localhost 5.4.274-qgki-g4670d6bdb795 #1 SMP PREEMPT Wed Apr 9 21:52:48 CST 2025 aarch64 Android
(venv3.8) ~/gitclone/spsdk $
I manually installed Microsoft Visual C++, rebooted my machine, re-ran the script "pip install -U spsdk" but it still terminates in the same error.
Then, re-ran "pip install --upgrade setuptools" and did the install again, same result.
(GetSpsdk) C:\Users\usb01768\GetSpsdk\Scripts>pip install --upgrade setuptools
Requirement already satisfied: setuptools in c:\users\usb01768\getspsdk\lib\site-packages (75.2.0)
I verified that I have Microsoft Visual C++ >v14.0 installed:
This is getting very frustrating.
Do you have any other ideas as to what might be the cause, and solution?
I also feel like there should be a check / update step in the Prerequisites document to prevent users from running into this.
Thanks very much!
Kind regards,
Nic
Hello Nic,
I had the same error during SPSDK installation and I also installed Microsoft Visual C++ manually, then it was solved.
Did you install the C++ x64/x86 build tools and Windows SDK as indicated in this link?
Below is a screenshot from the options I selected in the Visual Studio Build tools installer (Windows 10 SDK in my case):
Regards!
Jorge Gonzalez
Hi Jorge and team,
Just re-installed Visual C++ with the modified attributes, and now pip install -U spsdk completes without error. Thanks for helping resolve this!
I would recommend to add a check early on in the Prerequisites document, to prevent this corner case for some users, as it is time-consuming to correct late in the process (including requiring reboots, which doesn't help efficiency either).
Thanks again!
Kind regards,
Nic
I am glad it worked Nic!
I agree about your recommendation of the Prerequisites document.
Regards!
Jorge Gonzalez
Hi Jorge, thanks for your reply! It's encouraging that you found and fixed the issue.
I will modify my Build Tools install as below. This will take some time, so likely will revisit tomorrow.
Kind regards,
Nic