Osama29 / NILM

Non-Intrusive Load Monitoring Device
3 stars 0 forks source link

No module named "modbus_tk" #1

Open HazardousCoder opened 1 year ago

HazardousCoder commented 1 year ago

I keep getting this error all the time and i tried download modbus but it didn't work, how can i solve this issue

Traceback (most recent call last):
  File "/home/raspberrypi/PZEM-004t Raspberry Pi.py", line 4, in <module>
     import modbus_tk.defines as cst
ModuleNotFouundError: No module named 'modbus_tk'

------------------
(program exited with code: 1)
Press return to continue

I followed all the tutorial and it still didn't fix the issue

Osama29 commented 1 year ago

No Module named 'modbus_tk'

if you were trying to run PZEM-004t Raspberry Pi.py and it showed the following error:

Traceback (most recent call last):
  File "/home/raspberrypi/PZEM-004t Raspberry Pi.py", line 4, in <module>
     import modbus_tk.defines as cst
ModuleNotFouundError: No module named 'modbus_tk'

------------------
(program exited with code: 1)
Press return to continue

Then all you have to do is to run this comand in the terminal:

sudo pip3 install modbus-tk

or

sudo pip3 install pymodbus-tk

both of these can solve your issue

HazardousCoder commented 1 year ago

It worked, Thank you very much