DateTime add-on install fails when trying to build ephem._libastro extension

Hi All,

I’m trying to install the DateTime Add-on but it is running into issues installing.

“building ‘ephem._libastro’ extension”

Webthings is on a Pine64 running Armbian (Debian buster) (since Ubuntu bionic gave issues with the zigbee add-on)

Is this a bug, or is there something I can do to fix this myself

log

2020-05-03 08:51:05.328 INFO : date-time-adapter: building ‘ephem._libastro’ extension
2020-05-03 08:51:05.329 INFO : date-time-adapter: creating build/temp.linux-aarch64-3.7
2020-05-03 08:51:05.331 INFO : date-time-adapter: creating build/temp.linux-aarch64-3.7/extensions
2020-05-03 08:51:05.333 INFO : date-time-adapter: creating build/temp.linux-aarch64-3.7/libastro-3.7.7
2020-05-03 08:51:05.334 INFO : date-time-adapter: creating build/temp.linux-aarch64-3.7/extensions/data
2020-05-03 08:51:05.336 INFO : date-time-adapter: aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ilibastro-3.7.7 -I. -I/usr/include/python3.7m -c extensions/_libastro.c -o build/temp.linux-aarch64-3.7/extensions/_libastro.o
2020-05-03 08:51:05.338 INFO : date-time-adapter: extensions/_libastro.c:3:10: fatal error: Python.h: No such file or directory
2020-05-03 08:51:05.339 INFO : date-time-adapter: #include “Python.h”
2020-05-03 08:51:05.341 INFO : date-time-adapter: ^~~~~~~~~~
2020-05-03 08:51:05.343 INFO : date-time-adapter: compilation terminated.
2020-05-03 08:51:05.345 INFO : date-time-adapter: error: command ‘aarch64-linux-gnu-gcc’ failed with exit status 1
2020-05-03 08:51:05.346 INFO : date-time-adapter:
2020-05-03 08:51:05.348 INFO : date-time-adapter: ----------------------------------------
2020-05-03 08:51:05.352 INFO : date-time-adapter: Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-install-bfl09_ha/ephem/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-2gvpcmkl/install-record.txt --single-version-externally-managed --compile --prefix= --home=/tmp/pip-target-xct5l_uz” failed with error code 1 in /tmp/pip-install-bfl09_ha/ephem/
2020-05-03 08:51:05.701 INFO : date-time-adapter: Command ‘/usr/bin/python3 -m pip install --system --install-option="–prefix=" -t lib -r requirements.txt’ returned non-zero exit status 1.
2020-05-03 08:51:05.744 INFO : Plugin: date-time-adapter died, code = 100 NOT restarting…

You probably need to apt install python3-dev.

1 Like

Great, that did the trick.

Thanks