Please is it possible to use python packages developed for python 2.7, while running Appdaemon 3.xb? The reason is I got this package which is important to my project, but unfortunately was written using 2.x. Can’t get to the developer to upgrade it, so kind of stock with it. So please what options have I got?
Python and homeassistant are all python 3.0 as I am sure you are aware - I don’t know of any way you can mix the two natively.
You could write a standalone executable in 2.x and then run it from AppDaemon using popen(), however, if you did that you would tie up a worker thread which is not best practice, so you should create your own thread to do so.
Hello @aimc, well felt that’s the case, and yeah I do know they running 3.x. Though I have a separate script running the package I need, then using mqtt to send data across them both, but felt there might be some hidden way to achieve it in Appdaemon.
how big is the lib that you want to use?
i have rewritten some smaller scripts myself to change from 2.7 to 3.x
i think that in many cases its only a few commands that have to be changed to get it working in 3.x
if thats not possible i also see no other way then andrew described.
@ReneTode, well I can’t say its that massive, as I haven’t attempted to edit it myself. It is the Python package that comes with PJSIP or Most VoIP which is based on that of PJSIP, but I might just abandon the project as a whole.