genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
387 stars 154 forks source link

Python 3.7 #420

Closed soxfan1966 closed 1 year ago

soxfan1966 commented 3 years ago

Is your feature request related to a problem? Please describe. I have a Python script I want to run for Meross sensors but they require version 3.7 at least. HG is running 2.7 and appears to be integrated into the build? I had updated Python on my pi itself and could run the script from the command line but running within HG does not work.

Describe the solution you'd like Update HG to use the newest version, minimum 3.7, of Python.

Describe alternatives you've considered I tried manually update Python on my pi (which I did and it allowed me to use) but HG still appears to use the older version.

Additional context Add any other context or screenshots about the feature request here

mralapete commented 3 years ago

As you probably know Iron Python is deployed in HG and the latest version of this is 2.7. You might want to read up on Iron Python v Python to see the difference between both https://ironpython.net/download/

mralapete commented 3 years ago

You may have to adapt your Python code to run in Iron Python 2.7 if this warning is anything to go by https://github.com/IronLanguages/ironpython3

soxfan1966 commented 3 years ago

The problem is that the code I was trying to implement in HG is part of a library of external files which I have no control over. In order to be able to use that library, Python 3.7 is required, so if that is not currently possible given how HG implements Python scripts then my request would need to wait until that is possible.

gitbjo commented 3 years ago

Hi, there are several solutions to this:

So you don't have to wait.

Good luck.

soxfan1966 commented 3 years ago

Thank you for those suggestions, I appreciate it. The only downside is that I would need to install Python 3.7 (which I had, but have since removed) in addition to the Python version that HomeGenie uses. I have requested via the GitHub site for HomeGenie that the application be updated to use the newest release of Python, and there is some enhancement work going on there so I am hopeful that ends up being part of the solution. If not, I can pursue one of your suggestions - Thanks again.