Cannot install onewire, missing owcapi.h

I am trying to install onewire on my ARM platform and am apparently missing a file: I can’t post everything because is contains links and I am only allowed 2. Can someone help me with this? TIA.

sudo pip install onewire

Looking in indexes: **********************************
Collecting onewire
Using cached ******************************************/cd3ab987843e40ab0c09c0c5f7d49a270f6caa806bf06a59ecdc81725b3a/onewire-0.2.tar.gz
Building wheels for collected packages: onewire
Running setup.py bdist_wheel for onewire … error
Complete output from command /usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-install-vB5bVh/onewire/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/pip-wheel-VkY3t2 --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/onewire
copying onewire/init.py -> build/lib.linux-armv7l-2.7/onewire
running build_ext
building ‘onewire._ow’ extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/onewire
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-InigCj/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c onewire/_ow.c -o build/temp.linux-armv7l-2.7/onewire/_ow.o
onewire/_ow.c:2:10: fatal error: owcapi.h: No such file or directory
#include <owcapi.h>
^~~~~~~~~~
compilation terminated.
error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1


Failed building wheel for onewire
Running setup.py clean for onewire
Failed to build onewire
Installing collected packages: onewire
Running setup.py install for onewire … error
Complete output from command /usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-install-vB5bVh/onewire/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-record-8yAxcM/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/onewire
copying onewire/init.py -> build/lib.linux-armv7l-2.7/onewire
running build_ext
building ‘onewire._ow’ extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/onewire
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-InigCj/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c onewire/_ow.c -o build/temp.linux-armv7l-2.7/onewire/_ow.o
onewire/_ow.c:2:10: fatal error: owcapi.h: No such file or directory
#include <owcapi.h>
^~~~~~~~~~
compilation terminated.
error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1

----------------------------------------

Command “/usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-install-vB5bVh/onewire/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-record-8yAxcM/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-install-vB5bVh/onewire/

Seems like you are only missing system packages,
since it’s similar to this issue: https://www.raspberrypi.org/forums/viewtopic.php?t=18339
Maybe you can try to install libow-dev or the equivalent for your OS.

Thanks. That was it. Unfortunately I couldn’t find anything in the documentation that said libow-dev was a pre-req. Poor documentation has plagued me with this entire 1-wire project.