KiCad 5.1 - Ubuntu 18.04 - Plugin version

I installed Kicad 5.1 (ppa) on Ubuntu 18.04. It seems plugins now need to work with phython 3 ?
In python 2.7 yout get: ImportError: No module named pcbnew.
My question is there a way to get “old” plugins like **InteractiveHtmlBom working ?

Python 2 is dead: https://pythonclock.org/ (The only platform that might stay on python 2 for a while is windows as a major dependency has not been ported to python 3. Well they have 8 months.)

And interactive html bom got ported to python 3 in the latest release as far as i am aware. @qu1ck have i remembered this wrong?

Updated to iBOM 2.1 not working. KiCad calls Python 2.7. Wraparound with shell script, calling Python3 -> iBom reported WX errors. Now back to KiCad 5.0.2 all works well again.
You are right Python2 is diying, but on my Ubuntu seems to have time until 2023.
Needed for a bunch of own scripts i need to futurize …
Windows is no more an option.

Thanks for the support

You may get some mileage out of the https://docs.python.org/2/library/2to3.html script. This will convert Python 2 to Python 3 idioms but it is certainly not infallible especially if the code relies on external libraries. You probably need a modicum of coding knowledge to be able to use it effectively.

Yes, although I wouldn’t use word “ported” as that may imply that it no longer works with python 2, which is not the case. I merely fixed compatibility with python 3 so it now works with both.

@linuxwanted
if you need python 2 for other scripts to work it’s separate matter but if you want to debug why iBOM doesn’t work with python 3 on KiCad 5.1 I can help. But I would need more information, like the full kicad version including compile flags and what errors exactly are “WX errors” you see. Also I don’t see how KiCad 5.1 would “call python 2.7” unless you installed it not from standard ppa? What prompt do you see if you open scripting console in kicad? Does it say python 2?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.