Page 1 of 2

Python plugins not working

Posted: Tuesday 14 February 2017 16:26
by thomasvillagers
Hi,

on my raspy, python plugins do not work anymore with the latest beta

Version: 3.6707
Build Hash: 6674ca2

They did work before the update. Now, the start log tells me:

: 2017-02-14 16:20:33.647 PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.

But libpython3.4 is installed on the system, plugins worked before V 3.6707.

Do I miss something here?

- thomas

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 16:32
by ffes
I'm experiencing exactly the same problem. I opened a bug report for it as well: https://github.com/domoticz/domoticz/issues/1230

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 17:25
by gerardvs
Two minutes ago I compiled V3.6708 with python support with your buienradar plugin. Everything works fine!

--Gerard

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 17:52
by thomasvillagers
I'm sorry, still no luck:

Code: Select all

pi@raspberrypi:~$ domoticz/domoticz -verbose 2
2017-02-14 17:32:59.280  Domoticz V3.6708 (c)2012-2017 GizMoCuz
2017-02-14 17:32:59.280  Build Hash: 7b91f74, Date: 2017-02-14 16:52:55
2017-02-14 17:32:59.281  System: Raspberry Pi
2017-02-14 17:32:59.281  Startup Path: /home/pi/domoticz/
2017-02-14 17:32:59.406  Sunrise: 07:37:00 SunSet:17:41:00
2017-02-14 17:32:59.406  EventSystem: reset all events...
2017-02-14 17:32:59.412  PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.

Code: Select all

root@raspberrypi:/home/pi# dpkg -l | grep libpython3.4
ii  libpython3.4:armhf               3.4.2-1                    armhf        Shared Python runtime library (version 3.4)
ii  libpython3.4-minimal:armhf       3.4.2-1                    armhf        Minimal subset of the Python language (version 3.4)
ii  libpython3.4-stdlib:armhf        3.4.2-1                    armhf        Interactive high-level object-oriented language (standard library, version 3.4)
- thomas

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 17:58
by Brutus
gerardvs wrote:Two minutes ago I compiled V3.6708 with python support with your buienradar plugin. Everything works fine!

--Gerard
Works for me to!

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 21:20
by ffes
v3.6708 still has the problem for me:

Are we missing some additional required packages?

Code: Select all

2017-02-14 21:04:02.523 Domoticz V3.6708 (c)2012-2017 GizMoCuz
2017-02-14 21:04:02.528 Build Hash: 7b91f74, Date: 2017-02-14 16:52:55
2017-02-14 21:04:02.528 System: Raspberry Pi
2017-02-14 21:04:02.529 Startup Path: /home/pi/domoticz/
2017-02-14 21:04:02.825 EventSystem: reset all events...
2017-02-14 21:04:02.833 PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
2017-02-14 21:04:02.836 PluginSystem: 'Weer' Registration ignored, Plugins are not enabled.
2017-02-14 21:04:02.888 WebServer(HTTP) started on address: :: with port 8080
2017-02-14 21:04:02.914 WebServer(SSL) started on address: :: with port 443
2017-02-14 21:04:02.921 Proxymanager started.
2017-02-14 21:04:02.934 TCPServer: shared server started...
2017-02-14 21:04:02.934 RxQueue: queue worker started...
2017-02-14 21:04:04.939 EventSystem: reset all events...
2017-02-14 21:04:04.941 EventSystem: reset all device statuses...
2017-02-14 21:04:04.943 Philips Hue: Worker started...
2017-02-14 21:04:04.943 Hardware Monitor: Started
2017-02-14 21:04:04.944 ToonThermostat: Worker started...
2017-02-14 21:04:04.946 EventSystem: Started

Code: Select all

pi@domoticz:~/domoticz $ dpkg -l | grep libpython3.4
ii  libpython3.4:armhf             3.4.2-1                    armhf        Shared Python runtime library (version 3.4)
ii  libpython3.4-minimal:armhf     3.4.2-1                    armhf        Minimal subset of the Python language (version 3.4)
ii  libpython3.4-stdlib:armhf      3.4.2-1                    armhf        Interactive high-level object-oriented language (standard library, version 3.4)
pi@domoticz:~/domoticz $ uname -a
Linux domoticz 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/Linux

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 22:02
by Dnpwwo
I haven't changed this for a while (wasn't broken so I didn't try and fix it) but will have a look at it.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 22:13
by ffes
Just did

Code: Select all

sudo apt-get install python3-dev
Which seems to solve it. A bit strange that it is suddenly needed.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 22:39
by SweetPants
ffes wrote:Just did

Code: Select all

sudo apt-get install python3-dev
Which seems to solve it. A bit strange that it is suddenly needed.
As far as I know this was always needed, at least if you compile from source

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 14 February 2017 22:44
by ffes
I never compiled from sources (at least on my pi). Previous betas didn't need this. But apparently python3-dev is needed to run.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Wednesday 15 February 2017 9:14
by thomasvillagers
that fixed it, thank you!

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Wednesday 15 February 2017 9:25
by Holland
Reinstalling python3-dev did the trick

Strange, before 3.6707 (or maybe 1 version earlier) Python and the plugins were running smoothly. And yes, had python3-dev already installed.
Could also be related that I did a; apt-get install update+upgrade.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Wednesday 15 February 2017 21:21
by Dnpwwo
Strange, before 3.6707 (or maybe 1 version earlier) Python and the plugins were running smoothly. And yes, had python3-dev already installed.
Could also be related that I did a; apt-get install update+upgrade.
I tried an upgrade+update on Ubuntu 16.04 and it still worked afterwards without a re-install.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Wednesday 15 February 2017 22:51
by G3rard
On Ubuntu 14.04 and Domoticz v3.6708 the plugins are also still working without a re-install.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Monday 17 April 2017 8:19
by mikeoo
Upgraded to the latest beta 3.7349 result with the error

PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform

Tried
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-dev

But stil same error.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Monday 17 April 2017 8:25
by Dnpwwo
@mikeoo,

You need to provide more details.
  • Was it ever working?
  • What OS are you running?
  • Have you installed libpython3.x as the error suggests? (python3-dev is for when you build from source)

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Monday 17 April 2017 8:41
by mikeoo
@Dnpwwo

I just noticed the error and not sure if is was there before.
Using on Raspbian GNU/Linux 7 (wheezy)
Tried to run: sudo apt-get install libpython3.4 result with: Couldn't find any package by regex 'libpython3.4'

Bit lost now

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Monday 17 April 2017 9:07
by Dnpwwo
@mikeoo,

Wheezy does not have a version of Python compatible with Domoticz. If you don't want to upgrade to Jessie then there are instructions here: http://www.domoticz.com/wiki/Linux#Prob ... ing_Python

In short you need to build a version from source using:

Code: Select all

 wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
 tar -xvf Python-3.5.2.tar.xz
 cd Python-3.5.2
 ./configure --enable-shared
 make
 sudo make install

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Monday 17 April 2017 11:13
by mikeoo
Dnpwwo wrote:@mikeoo,

Wheezy does not have a version of Python compatible with Domoticz. If you don't want to upgrade to Jessie then there are instructions here: http://www.domoticz.com/wiki/Linux#Prob ... ing_Python

In short you need to build a version from source using:

Code: Select all

 wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
 tar -xvf Python-3.5.2.tar.xz
 cd Python-3.5.2
 ./configure --enable-shared
 make
 sudo make install
That one fixed the problem :D

Status: PluginSystem: Started, Python version '3.5.2'.

Thanks for the support.

Re: Python plugins not working anymore with latest beta Version: 3.6707

Posted: Tuesday 16 May 2017 16:00
by leecollings
Hey,

Just wanted to ask, is it usual for it to take a considerable long time after the last command here? I'm not sure if I've had a crash or not.

It's taking ages after the MAKE command, outputting blocks of text after every few minutes like this:

gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -fPIC -DPy_BUILD_CORE -o Objects/unicodeobject.o Objects/unicodeobject.c