jedie / pysmartmeter

Collect data from Hitchi Smartmeter and expose it via MQTT
GNU General Public License v3.0
7 stars 1 forks source link

Install fails on raspberry pi os 32bit bullseye #43

Open tmp-hallenser opened 9 months ago

tmp-hallenser commented 9 months ago

Hi,

I tried to install the library following the instruction (raspberry pi 2, bullseye 32bit). Calling ./cli.py --help results in the below error message. Which package am I missing (I spend some time searching already, but without a solution)

+ /home/pi/pysmartmeter/.venv-app/bin/pip-sync /home/pi/pysmartmeter/requirements.txt

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
Collecting arrow==1.2.3 (from -r /tmp/tmp3pdluhe8 (line 1))
  Using cached arrow-1.2.3-py3-none-any.whl (66 kB)
Collecting binaryornot==0.4.4 (from -r /tmp/tmp3pdluhe8 (line 4))
  Using cached https://www.piwheels.org/simple/binaryornot/binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting bx-py-utils==82 (from -r /tmp/tmp3pdluhe8 (line 7))
  Using cached bx_py_utils-82-py3-none-any.whl (45 kB)
Collecting certifi==2023.5.7 (from -r /tmp/tmp3pdluhe8 (line 10))
  Using cached certifi-2023.5.7-py3-none-any.whl (156 kB)
Collecting chardet==5.1.0 (from -r /tmp/tmp3pdluhe8 (line 13))
  Using cached chardet-5.1.0-py3-none-any.whl (199 kB)
Collecting charset-normalizer==3.1.0 (from -r /tmp/tmp3pdluhe8 (line 16))
  Using cached charset_normalizer-3.1.0-py3-none-any.whl (46 kB)
Collecting click==8.1.3 (from -r /tmp/tmp3pdluhe8 (line 92))
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting cookiecutter==2.1.1 (from -r /tmp/tmp3pdluhe8 (line 95))
  Using cached cookiecutter-2.1.1-py2.py3-none-any.whl (36 kB)
Collecting ha-services==0.3.2 (from -r /tmp/tmp3pdluhe8 (line 98))
  Using cached ha_services-0.3.2-py3-none-any.whl (53 kB)
Collecting idna==3.4 (from -r /tmp/tmp3pdluhe8 (line 101))
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting jinja2==3.1.2 (from -r /tmp/tmp3pdluhe8 (line 104))
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting jinja2-time==0.2.0 (from -r /tmp/tmp3pdluhe8 (line 107))
  Using cached https://www.piwheels.org/simple/jinja2-time/jinja2_time-0.2.0-py2.py3-none-any.whl (6.4 kB)
Collecting manageprojects==0.10.0 (from -r /tmp/tmp3pdluhe8 (line 110))
  Using cached manageprojects-0.10.0-py3-none-any.whl (78 kB)
Collecting markdown-it-py==2.2.0 (from -r /tmp/tmp3pdluhe8 (line 113))
  Using cached markdown_it_py-2.2.0-py3-none-any.whl (84 kB)
Collecting markupsafe==2.1.2 (from -r /tmp/tmp3pdluhe8 (line 116))
  Using cached MarkupSafe-2.1.2.tar.gz (19 kB)
  Preparing metadata (setup.py) ... done
Collecting mdurl==0.1.2 (from -r /tmp/tmp3pdluhe8 (line 167))
  Using cached https://www.piwheels.org/simple/mdurl/mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting msgspec==0.15.1 (from -r /tmp/tmp3pdluhe8 (line 170))
  Using cached msgspec-0.15.1.tar.gz (191 kB)
  Preparing metadata (setup.py) ... done
Collecting paho-mqtt==1.6.1 (from -r /tmp/tmp3pdluhe8 (line 200))
  Using cached paho-mqtt-1.6.1.tar.gz (99 kB)
  Preparing metadata (setup.py) ... done
Collecting pygments==2.15.1 (from -r /tmp/tmp3pdluhe8 (line 202))
  Using cached Pygments-2.15.1-py3-none-any.whl (1.1 MB)
Collecting pyserial==3.5 (from -r /tmp/tmp3pdluhe8 (line 205))
  Using cached https://www.piwheels.org/simple/pyserial/pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting python-dateutil==2.8.2 (from -r /tmp/tmp3pdluhe8 (line 208))
  Using cached https://www.piwheels.org/simple/python-dateutil/python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting python-slugify==8.0.1 (from -r /tmp/tmp3pdluhe8 (line 211))
  Using cached python_slugify-8.0.1-py2.py3-none-any.whl (9.7 kB)
Collecting pyyaml==6.0 (from -r /tmp/tmp3pdluhe8 (line 214))
  Using cached PyYAML-6.0.tar.gz (124 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      running egg_info
      writing lib/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 288, in <module>
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 318, in run
          self.find_sources()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 326, in find_sources
          mm.run()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 548, in run
          self.add_defaults()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 586, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/command/sdist.py", line 113, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
        File "<string>", line 204, in get_source_files
        File "/tmp/pip-build-env-dek6lhgn/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Traceback (most recent call last):
  File "/home/pi/pysmartmeter/.venv-app/bin/pip-sync", line 8, in <module>
    sys.exit(cli())
  File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/piptools/scripts/sync.py", line 205, in cli
    sync.sync(
  File "/home/pi/pysmartmeter/.venv-app/lib/python3.9/site-packages/piptools/sync.py", line 263, in sync
    run(  # nosec
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/pi/pysmartmeter/.venv-app/bin/python', '-m', 'pip', 'install', '-r', '/tmp/tmp3pdluhe8', '--extra-index-url', 'https://www.piwheels.org/simple']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/home/pi/pysmartmeter/./cli.py", line 115, in <module>
    main(sys.argv)
  File "/home/pi/pysmartmeter/./cli.py", line 101, in main
    verbose_check_call(PIP_SYNC_PATH, str(DEP_LOCK_PATH))
  File "/home/pi/pysmartmeter/./cli.py", line 81, in verbose_check_call
    return subprocess.check_call(popen_args)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '(PosixPath('/home/pi/pysmartmeter/.venv-app/bin/pip-sync'), '/home/pi/pysmartmeter/requirements.txt')' returned non-zero exit status 1.

Thanks!

tmp-hallenser commented 8 months ago

After some debugging, it's the python version. Tested it with python 3.11 and it works (but my smart meter is speaking smh :()