Seeing this error even after installing kafka-python in the MLOPs course Lab : Streamdata using Apache Kafka Question 8 : Write and run the Python producer script.
To solve this install kafka-python-ng instead of kafka-python (an issue with python > 3.12 )
Check this SO thread - python - ModuleNotFoundError: No module named 'kafka.vendor.six.moves' in Dockerized Django Application - Stack Overflow