tuya-convert: ModuleNotFoundError: No module named 'Cryptodome'

When flashing a new device with

Starting smart config pairing procedure
Waiting for the device to install the intermediate firmware
Traceback (most recent call last):
  File "./smartconfig/main.py", line 15, in <module>
    from smartconfig import smartconfig
  File "/home/fred/tuya-convert/scripts/smartconfig/smartconfig.py", line 43, in <module>
    from multicast import multicast_head, encode_multicast_body
  File "/home/fred/tuya-convert/scripts/smartconfig/multicast.py", line 12, in <module>
    from Cryptodome.Cipher import AES
ModuleNotFoundError: No module named 'Cryptodome'

This is with the latest checkout (release v2.4.3) on my Raspberry Pi 4. I’ll try and fix the issue and report back.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 22

Most upvoted comments

I had this same issue, which was a result of installing the prerequisites as sudo - and then running start_flash.sh without sudo.

So to reword this - manually installing the prerequisites from install_prereq.sh without sudo fixed my issue (or running start_flash.sh with sudo).

this help

sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED