Where does the python plugin handler get it's pythonpath?
Posted: Wednesday 18 July 2018 15:28
I'm mucking about with a python plugin for a mi mini wifi plug.
It relies on python-miio.
installs everything in ~/.local/lib/python3.6/site-packages/
That's how it is supposed to work - it won't put things into the system python, so that needs to be on the domoticz python path to be found by my plugin?
I've tried copying the contents of my site-packages to the domoticz/plugins/myplugin folder, but it fails to load a dynamic library needed - the error message includes a path that seems to have come from somewhere - can anyone offer a clue as to how I might change one of the two copies of "/usr/lib/python3.6" into something more useful for my plugin please?
It relies on python-miio.
Code: Select all
pip3 install python-miio
That's how it is supposed to work - it won't put things into the system python, so that needs to be on the domoticz python path to be found by my plugin?
I've tried copying the contents of my site-packages to the domoticz/plugins/myplugin folder, but it fails to load a dynamic library needed - the error message includes a path that seems to have come from somewhere - can anyone offer a clue as to how I might change one of the two copies of "/usr/lib/python3.6" into something more useful for my plugin please?
2018-07-18 23:18:54.962 Error: (Miio_plugin) failed to load 'plugin.py', Python Path used was '/home/rlazarus/domoticz/plugins/Miio_plugin/:/usr/lib/python36.zip:/usr/lib/python3.6:
/usr/lib/python3.6:/usr/lib/python3.6/lib-dynload'.
2018-07-18 23:18:54.962 Error: (rossmiio) Module Import failed, exception: 'ModuleNotFoundError'
2018-07-18 23:18:54.962 Error: (rossmiio) Module Import failed: ' Name: miio'