Error in Kafka Lab : MLOps Course

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

I looked at the lab, and AFAICT, if you do pip install kafka-python, what you actually get is kafka-python-ng. So that’s probably not your problem.

I did try the lab, and in step 3, I suspect the cause is actually our use of an HTTP mirror for Docker Hub, rather than the saner and safer TLS. I’ve reported this to engineering; we’ll see what they do about it.