Pymodbus Import Error: Cannot Import Name 'Modbusserialclient'

Pymodbus Import Error: Cannot Import Name 'Modbusserialclient'

I'm using raspberry pi 4, I want to communicate with my sensor through modbus ascii, and then I wrote a code using the "pymodbus", I'm sure I have installed it, and its version is 3.0.0r1, but when I import it, it shows:

Traceback (most recent call last): File "/home/yisi/Desktop/modbus.py", line 3, in from pymodbus import ModbusSerialClient as ModbusClient ImportError: cannot import name 'ModbusSerialClient' from 'pymodbus' (/usr/lib/python3/dist-packages/pymodbus/init.py)

anyone facing the same problem? I will appreciate it if you can give your advice. [enter image description here]()

I want to communicate with my sensor through modbus ascii

2
David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.