Page 1 of 1

python search path

Posted: Wednesday 12 September 2018 20:11
by meyland
Hi

I'm trying to develop a new plugin to get sea water temperature. My problem is the module "requests", which domoticz can't find. The search path is: /usr/lib64/python36.zip:/usr/lib64/python3.6:/usr/lib64/python3.6:/usr/lib64/python3.6/lib-dynload and, of course, the plugin folder. The module is installed in the folder "/usr/lib/python3.6/site-packages/" and this folder is not found in the search path.

Can anyone please help me, so I can get the temperatures

My system is Fedora 29 x64

Re: python search path

Posted: Wednesday 12 September 2018 21:57
by heggink
I had a similar issue where my python installation was a bit messed up and reinstalling is not an option ATM.
I fixed it by figuring out where the package was installed and aging PYTHONPATH to domoticz.sh in /etc/init.d (services startup). Your distro may have a different path for domoticz.sh unless also Debian based. Add all the search paths to PYTHONPATH. Alternatively add the path in your python script.

Re: python search path

Posted: Thursday 13 September 2018 20:27
by meyland
Thanks, it is now working

And now I can start to debug the code

Re: python search path

Posted: Thursday 13 September 2018 22:14
by heggink
Great! good luck.