我正在使用带有 python 3.9 和 confluent_kafka 库的 conda 环境(通过 pip install confluent-kafka 安装)。我还安装了 librdkafka。从 pycharm 我无法导入:
from confluent_kafka import Producer
我收到此错误:
Traceback (most recent call last):
File "D:/Python/Projects/Kafka/main.py", line 1, in <module>
from confluent_kafka import Producer
File "C:\Users\kmode\anaconda3\envs\dataScience\lib\site-packages\confluent_kafka\__init__.py", line 40, in <module>
from .deserializing_consumer import DeserializingConsumer
File "C:\Users\kmode\anaconda3\envs\dataScience\lib\site-packages\confluent_kafka\deserializing_consumer.py", line 19, in <module>
from confluent_kafka.cimpl import Consumer as _ConsumerImpl
ImportError: DLL load failed while importing cimpl:
你能帮忙解决这个问题吗?