-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: DLL load failed while importing cimpl: The specified module could not be found. #1186
Comments
I am currently experiencing this same issue exactly as described in the original posting, and I have been since I started working with the Kafka Python client on Windows 10 in February 2021. Would love a solution for this so I can leverage later versions of Python in my own code that uses confluent_kafka. |
If possible, could you try locating the librdkafka.dll in your Python installation location (e.g., site-packages/..) and then run dumpbin is typically part of the MSVC compiler suite. |
Hi, Thanks for replying! I could not find a librdkafka.dll file in any of the following locations: C:[username]\Miniconda3\envs\py38 My apologies if I'm not looking in the right locations; I'm not terribly familiar with Windows systems in general. Should I be looking someplace else? Thank you for your help! |
.dll files were found here: |
Thanks @mikesmith1611, that looks good. |
There is no msvcrt.dll there is an msvcr120.dll as shown in above output. This is the list of files @edenhill :
|
Thank you. |
|
Thank you! So it seems all the libraries are in order, so maybe Python is looking for cimpl/librdkafka in the wrong location? |
This is the confluent_kafta directory containing cimpl.cp38-win_amd64.pyd. There are no dlls in here. Cannot find any other reference to cimpl library in my env.
|
@edenhill In PyCharm using python 3.7 I can navigate to cimpl.py via ctrl + click on the "from .cimpl import ..." line in the confluent_kafka.__init__.py but in 3.8 it says cannot find declaration. |
I think .pyd might actually be a DLL, so try dumpbin on it. |
|
🤷 Very weird. Everything looks fine. |
Can you recreate the issue using a python 3.8 conda virtual environment? |
I haven't used conda before, am I supposed to install it confluent-kafka with |
Through pip in a conda environment:
|
Thanks! Reproduced. Non the wiser |
Seems like this is a problem with conda: The provided workaround works:
|
This worked! Thank you. Hopefully they put in a fix for this. At least it is an easy workaround. |
Description
Import error on Windows 10 pythnon 3.8 and 3.9 conda environments. Python 3.7 works as expected.
confluent_kafka versions 1.6.0 and 1.7.0
Using binary wheels via pip install.
How to reproduce
conda create --name py38 python=3.8
conda activate py38
pip install confluent_kafka
start python terminal and import conlfluent kafka
Checklist
Please provide the following information:
confluent_kafka.version()
andconfluent_kafka.libversion()
): 1.60&1.70 cannot get at libversion as cannot import{...}
- not relevent'debug': '..'
as necessary) - aboveThe text was updated successfully, but these errors were encountered: