I am on Ubuntu 18.04 and have 2 Apple TVs
Python 3.5 installed
jpy and pyTV installed.
root@robin:/usr/bin# tail -f /var/log/openhab2/openhab.log | grep "jpy."
2019-04-02 11:36:49.539 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpyLib=lib/jpy/lib.synology-x86-64-3.5
2019-04-02 11:36:49.541 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonExecutable: /usr/bin/python3
2019-04-02 11:36:49.557 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonLib: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
2019-04-02 11:36:49.560 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jpyLib: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so
2019-04-02 11:36:49.563 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jdlLib: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jdl.so
2019-04-02 11:36:49.565 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonPrefix: /usr
java.lang.UnsatisfiedLinkError: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so: /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so: undefined symbol: PyFloat_Type
at org.jpy.PyLib.loadLib(PyLib.java:416) ~[?:?]
at org.jpy.PyLib.<clinit>(PyLib.java:465) ~[?:?]
at org.openhab.binding.appletv.internal.jpy.LibPyATV.<init>(LibPyATV.java:157) ~[?:?]
2019-04-02 11:36:52.902 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpyLib=lib/jpy/lib.synology-x86-64-3.5
2019-04-02 11:36:52.903 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonExecutable: /usr/bin/python3
2019-04-02 11:36:52.912 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonLib: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
2019-04-02 11:36:52.926 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jpyLib: /var/lib/openhab2/tmp/ohlib-3908827599501265320/jpy.so
2019-04-02 11:36:52.928 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.jdlLib: /var/lib/openhab2/tmp/ohlib-3908827599501265320/jdl.so
2019-04-02 11:36:52.933 [DEBUG] [pletv.internal.AppleTVHandlerFactory] - Apple-TV.PyATV: jpy.pythonPrefix: /usr
java.lang.NoClassDefFoundError: Could not initialize class org.jpy.PyLib
at org.openhab.binding.appletv.internal.jpy.LibPyATV.<init>(LibPyATV.java:157) ~[?:?]
^C
root@robin:/usr/bin# /usr/bin/python3 --version
Python 3.5.7
root@robin:/usr/bin# file /var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so
/var/lib/openhab2/tmp/ohlib-3421330354994831441/jpy.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=973323b28cebcde213556266ded7c036a84892d5, with debug_info, not stripped
But I think my pyatv is busted nowβ¦ (has been workingβ¦)
root@robin:/usr/bin# sudo /usr/bin/python3 -m pip install pyatv
The directory '/home/bnp/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/bnp/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pyatv
Downloading https://files.pythonhosted.org/packages/ef/76/b32b5fed37022612a48300b7666c8e75315cfddc9b7734e442a613140765/pyatv-0.3.12-py3-none-any.whl (41kB)
100% |ββββββββββββββββββββββββββββββββ| 51kB 1.6MB/s
Collecting curve25519-donna>=1.3 (from pyatv)
Downloading https://files.pythonhosted.org/packages/01/05/1ab1cc54c2b1e933721b8e65fedc01098e6b8ffdccedbc4a682d4e0db8c1/curve25519-donna-1.3.tar.gz
Collecting aiohttp>=3.0.1 (from pyatv)
Downloading https://files.pythonhosted.org/packages/21/e6/35e3f6b1a0aea0c5567ef7fadc727487cacb7a15a892403213fcee8f9280/aiohttp-3.5.4-cp35-cp35m-manylinux1_x86_64.whl (1.1MB)
100% |ββββββββββββββββββββββββββββββββ| 1.1MB 357kB/s
Requirement already satisfied: cryptography>=1.8.1 in /usr/lib/python3/dist-packages (from pyatv)
Requirement already satisfied: srptools>=0.2.0 in /usr/local/lib/python3.5/dist-packages (from pyatv)
Collecting ed25519>=1.4 (from pyatv)
Downloading https://files.pythonhosted.org/packages/d5/d6/cd19a64022dc7557d245aad6a943eed7693189b48c58a9adf3bc00ceedc5/ed25519-1.4.tar.gz (866kB)
100% |ββββββββββββββββββββββββββββββββ| 870kB 507kB/s
Requirement already satisfied: zeroconf>=0.17.7 in /usr/local/lib/python3.5/dist-packages (from pyatv)
Requirement already satisfied: netifaces>=0.10.0 in /usr/lib/python3/dist-packages (from pyatv)
Requirement already satisfied: chardet<4.0,>=2.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.0.1->pyatv)
Collecting typing-extensions>=3.6.5; python_version < "3.7" (from aiohttp>=3.0.1->pyatv)
Downloading https://files.pythonhosted.org/packages/0f/62/c66e553258c37c33f9939abb2dd8d2481803d860ff68e635466f12aa7efa/typing_extensions-3.7.2-py3-none-any.whl
Collecting async-timeout<4.0,>=3.0 (from aiohttp>=3.0.1->pyatv)
Downloading https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl
Collecting idna-ssl>=1.0; python_version < "3.7" (from aiohttp>=3.0.1->pyatv)
Downloading https://files.pythonhosted.org/packages/46/03/07c4894aae38b0de52b52586b24bf189bb83e4ddabfe2e2c8f2419eec6f4/idna-ssl-1.1.0.tar.gz
Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.0.1->pyatv)
Collecting yarl<2.0,>=1.0 (from aiohttp>=3.0.1->pyatv)
Downloading https://files.pythonhosted.org/packages/f4/56/c6dc878f561034862c1c97c052ed7d5363bed12ce95a9390ea85163ba3a0/yarl-1.3.0-cp35-cp35m-manylinux1_x86_64.whl (247kB)
100% |ββββββββββββββββββββββββββββββββ| 256kB 1.6MB/s
Collecting multidict<5.0,>=4.0 (from aiohttp>=3.0.1->pyatv)
Downloading https://files.pythonhosted.org/packages/0a/32/f0840e0305a79f8adbc606623a8a8d0196e931a07b946557fdff9df1196b/multidict-4.5.2-cp35-cp35m-manylinux1_x86_64.whl (304kB)
100% |ββββββββββββββββββββββββββββββββ| 307kB 1.2MB/s
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from srptools>=0.2.0->pyatv)
Requirement already satisfied: ifaddr in /usr/local/lib/python3.5/dist-packages (from zeroconf>=0.17.7->pyatv)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from idna-ssl>=1.0; python_version < "3.7"->aiohttp>=3.0.1->pyatv)
Installing collected packages: curve25519-donna, typing-extensions, async-timeout, idna-ssl, multidict, yarl, aiohttp, ed25519, pyatv
Running setup.py install for curve25519-donna ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tgpqp6fx/curve25519-donna/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-_e08me9o-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/curve25519
copying python-src/curve25519/__init__.py -> build/lib.linux-x86_64-3.5/curve25519
copying python-src/curve25519/keys.py -> build/lib.linux-x86_64-3.5/curve25519
creating build/lib.linux-x86_64-3.5/curve25519/test
copying python-src/curve25519/test/test_curve25519.py -> build/lib.linux-x86_64-3.5/curve25519/test
copying python-src/curve25519/test/__init__.py -> build/lib.linux-x86_64-3.5/curve25519/test
copying python-src/curve25519/test/test_speed.py -> build/lib.linux-x86_64-3.5/curve25519/test
running build_ext
building 'curve25519._curve25519' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/python-src
creating build/temp.linux-x86_64-3.5/python-src/curve25519
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-aK5X5j/python3.5-3.5.7=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c python-src/curve25519/curve25519module.c -o build/temp.linux-x86_64-3.5/python-src/curve25519/curve25519module.o
python-src/curve25519/curve25519module.c:3:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tgpqp6fx/curve25519-donna/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-_e08me9o-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-tgpqp6fx/curve25519-donna/
root@robin:/usr/bin#
Guess it was busted during several tries/attemps of all sorts