jedie / inverter-connect

Get information from Deye Microinverter
https://pypi.org/project/inverter-connect/
GNU General Public License v3.0
27 stars 9 forks source link

Python version error on Raspberry Pi #99

Closed GijsbertV closed 1 year ago

GijsbertV commented 1 year ago

Dear,

Apologies I am new to Github, so please let me know whether I am addressing you properly on this topic.

I have downloaded and used your software with succes and can use in on my MAC now, real nice features!

As I moved to install it on my raspberry Pi however, I am getting an error on the Python version. My current version is 3.11.4 which I think is sufficient.

Below the output showing the problem, I hope you can help:

pi@raspberrypi:~/inverter-connect $ ./cli.py --help Traceback (most recent call last): File "./cli.py", line 35, in assert sys.version_info >= (3, 9), 'Python version is too old!' AssertionError: Python version is too old!

pi@raspberrypi:~/inverter-connect $ python -V Python 3.11.4

Some more information on the Raspberry:

model name : ARMv7 Processor rev 4 (v7l) PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"

GijsbertV commented 1 year ago

I now tried running with the assert disabled as I was confident the version was high enough but then got the following error:

pi@raspberrypi:~/inverter-connect $ ./cli.py --help

Traceback (most recent call last): File ".venv-app/bin/pip-sync", line 5, in from piptools.scripts.sync import cli File "/home/pi/inverter-connect/.venv-app/lib/python3.7/site-packages/piptools/scripts/sync.py", line 17, in from .. import sync File "/home/pi/inverter-connect/.venv-app/lib/python3.7/site-packages/piptools/sync.py", line 11, in from pip._internal.commands.freeze import DEV_PKGS ImportError: cannot import name 'DEV_PKGS' from 'pip._internal.commands.freeze' (/home/pi/inverter-connect/.venv-app/lib/python3.7/site-packages/pip/_internal/commands/freeze.py) Traceback (most recent call last): File "./cli.py", line 115, in main(sys.argv) File "./cli.py", line 101, in main verbose_check_call(PIP_SYNC_PATH, str(DEP_LOCK_PATH)) File "./cli.py", line 81, in verbose_check_call return subprocess.check_call(popen_args) File "/usr/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '(PosixPath('.venv-app/bin/pip-sync'), 'requirements.txt')' returned non-zero exit status 1.

GijsbertV commented 12 months ago

Apologies, I found out that although the python version was upgraded on the raspberry, the path was not properly defined to the new version. Once that was resolved all worked as expected.