LE is installing PyCryptodome to /usr/lib/python*/site-packages if that help.
Python 3 script in LibreELEC 10
-
jim_p -
September 26, 2021 at 3:05 PM -
Thread is Unresolved
-
-
Well, I took a stab at modifying the wrapper script that is posted in this thread. Here is what I tried:
New file named testwrapper.sh
Bash#!/bin/sh PYTHONPATH= for addon in /usr/lib/python*/site-packages/Crypto /storage/.kodi/addons/*/lib /storage/.kodi/addons/*/libs /usr/lib/kodi/addons/*/lib; do [ -d "${addon}" ] && PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${addon}" done export PYTHONPATH exec /usr/bin/python "$@"
I confirmed that does seem to be the location of cryptography but maybe it needs to point to a specific subdirectory or file in that directory or maybe my "stab" was all wrong?
This is what I get
Shell session
Display More# ./testwrapper.sh cabernet/tvh_main.py Unable to load pip module to install cryptography module Traceback (most recent call last): File "cabernet/tvh_main.py", line 10, in <module> from lib import main File "/storage/.kodi/cabernet/lib/main.py", line 42, in <module> import lib.clients.web_tuner as web_tuner File "/storage/.kodi/cabernet/lib/clients/web_tuner.py", line 34, in <module> from lib.streams.internal_proxy import InternalProxy File "/storage/.kodi/cabernet/lib/streams/internal_proxy.py", line 30, in <module> from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes ModuleNotFoundError: No module named 'cryptography'
This would be really cool as cabernet (https://cabernetwork.github.io/) allows one to merge M3u lists and xml files by way of a web GUI and has some built in sources like xumo and pluto. Also it could probably work with the ffmpeg addon (as I recall there is one???) to proxy problematic sources. Not just useful for simple IPTV client but any PVR back-end.
It could easily be installed into the addons folder and run from there I would think.
As I recall there is (or was) an addon that among other things could run a script at starup but not finding it in current list of addons, so would have to start in autostart.sh . It would literally need nothing else other than cryptograpy and the existing GUI could serve as the interface.
-
So you don't need a cryptography package but the python package cryptography. This has to be build for LE.
Start thinking of a docker solution.
-
No than ks on the docker, I have tried that too much overhead on my little LE system. I think both these packages are set up for docker just that it seems to resource intensive for a docker instance for everything you want to run. Better that I just run it elsewhere.
Not sure why everyone is so bent on running "another docker instance" to make something work. Must be nice to have a powerful CPU with memory to spare everywhere.
-
In case anyone has any idea, I am getting this message when running a new script.
CodeError Contents: No module named html Traceback stuff with the failed lines ImportError: No module named html
Which addon may have such a library?
---edit
Nvm, it is a lib that comes with python3 and I tried to execute the script on python2 (on le 9), thus the error.
I need to stop doing stuff before 8am
-