Xenomes / Domoticz-TinyTUYA-Plugin

A bridge between Tinytuya and Domoticz
11 stars 6 forks source link

Plugin init error #109

Closed PowerTcX closed 1 month ago

PowerTcX commented 1 month ago

Hi, i got error in a Domoticz log - 2024-07-12 19:30:26.148 Error: Tuya Smart SW hardware (10) thread seems to have ended unexpectedly Domoticz info - Version: 2024.6 Build Hash: 259ca0b04 Compile Date: 2024-07-08 10:26:15 dzVents Version: 3.1.8 Python Version: 3.8.15 (default, Jul 10 2024, 21:42:33) [GCC 8.3.0]

while running command - sudo pip3 install requests==2.23.0 charset-normalizer==3.0.1 tinytuya -U got error - ERROR: Can not execute setup.py since setuptools is not available in the build environment. [end of output] solved "setuptools" error, got another: Now i get - This package requires Rust >=1.63.0.

Xenomes commented 1 month ago

Hi, Strange, Rust is not a part of the plugin, so the error you're encountering seems unrelated. To fix the "setuptools" error, try running: sudo pip3 install rust should fix that.

What is the used OS and distro?

PowerTcX commented 1 month ago

Thank U for fast reply, screenshot of my last try - image

OS:
/home/pi/domoticz$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Xenomes commented 1 month ago

looks like rust is installed but a wrong version. sudo pip3 install rust -U will update to the highest version

PowerTcX commented 1 month ago

Something went wrong -

pi@raspberrypi:~/domoticz/plugins $ sudo pip3 install rust -U
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting rust
  Using cached https://www.piwheels.org/simple/rust/RUST-1.3.1-py3-none-any.whl (49 kB)
Collecting pysam (from rust)
  Using cached pysam-0.22.1.tar.gz (4.6 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting matplotlib (from rust)
  Using cached matplotlib-3.7.5.tar.gz (38.1 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
      Collecting certifi>=2020.06.20
        Using cached https://www.piwheels.org/simple/certifi/certifi-2024.7.4-py3-none-any.whl (162 kB)
      Collecting oldest-supported-numpy
        Using cached https://www.piwheels.org/simple/oldest-supported-numpy/oldest_supported_numpy-2023.12.21-py3-none-any.whl (4.9 kB)
      Collecting pybind11>=2.6
        Using cached https://www.piwheels.org/simple/pybind11/pybind11-2.13.1-py3-none-any.whl (238 kB)
      Collecting setuptools>=42
        Using cached https://www.piwheels.org/simple/setuptools/setuptools-70.3.0-py3-none-any.whl (931 kB)
      Collecting setuptools_scm>=7
        Using cached https://www.piwheels.org/simple/setuptools-scm/setuptools_scm-8.1.0-py3-none-any.whl (43 kB)
      Collecting numpy==1.17.3 (from oldest-supported-numpy)
        Using cached numpy-1.17.3.zip (6.4 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'error'
        error: subprocess-exited-with-error

        × python setup.py egg_info did not run successfully.
        │ exit code: 1
        ╰─> [1 lines of output]
            ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
            [end of output]

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

      × Encountered error while generating package metadata.
      ╰─> See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]

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

× pip subprocess to install build dependencies 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.
pi@raspberrypi:~/domoticz/plugins $ sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-setuptools is already the newest version (40.8.0-1).
python-setuptools set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Xenomes commented 1 month ago

MMM, your Python setup seems a little bit messed up. By running: sudo pip3 install rust==1.41.1 you can revert to the previous version.

PowerTcX commented 1 month ago

This also result error: Screenshot_20240713_074531_JuiceSSH What I done before- install required 3.8 python version. Python and libpython mismatch, if I understand correctly: Screenshot_20240713_082344_JuiceSSH

And then running -

pi@raspberrypi:~ $ sudo apt install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.7.3-1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Xenomes commented 1 month ago

Buster has default python 3.10.* i have no idea how to repair your python system. You need Linux help! https://forums.raspberrypi.com

PowerTcX commented 1 month ago

Thank U, i will try fix it.