Chris Sun
1 min readOct 8, 2020

--

10s to easily install confluent-kafka[avro] in Windows

Photo by bruce mars on Unsplash

If you are using Python for Kafka development, you have to use confluent-kafka, which can be easily installed in ubuntu, but no easy in Windows. You may have searched for hours and install giant Visual Studio IDE and have no clue which component you should install.

Here is the solution for that.

Go to https://mirrors.aliyun.com/pypi/simple/confluent-kafka/ to find the latest wheel file for your requirement. The one I choose is confluent_kafka-1.5.0-cp37-cp37m-win_amd64.whl.

Here are the steps to solve your problem.

  1. Create a virtual env with corresponding python version as well as requests package, such as
conda create -n kafka-py37 python=3.7 requests

2. Install the wheel file

conda activate kafka-py37
pip install confluent_kafka-1.5.0-cp37-cp37m-win_amd64.whl

3. If you need avro, pip install it. This is equivalent to confluent_kafka[avro]

pip install avro

That is all, you can setup the interpreter in your IDE now.

--

--