I am trying to start a project using kafka python client with a file pulse connector.
‘’’
import sys
import confluent_kafka
from confluent_kafka import Consumer, Producer, KafkaError
‘’’
yields error:
Traceback (most recent call last):
File “c:\Users\Trading\Desktop\conn\confluent_stream.py”, line 3, in
from confluent_kafka import Consumer, Producer, KafkaError
ImportError: cannot import name ‘Consumer’ from ‘confluent_kafka’ (unknown location)
i installed, uninstalled, i checked paths…PS C:\Users\Trading\Desktop\conn> pip show confluent_kafka
Name: confluent-kafka
Version: 2.0.2
Summary: Confluent’s Python client for Apache Kafka
Home-page: GitHub - confluentinc/confluent-kafka-python: Confluent's Kafka Python Client
Author: Confluent Inc
Author-email: support@confluent.io
License:
Location: c:\users\trading\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires:
Required-by:/…
I am not sure why my scrip[t cant recognize the modules for Consumer, Producer, and KafkaError.
Appreciate any help