pywhispercpp: Fix for "_pywhispercpp module could not be found" didn't fix module could not be found.
Original issue: https://github.com/abdeladim-s/pywhispercpp/issues/34
I’m having the same issue when using pip install pywhispercpp despite it successfully installing. Seems like something is broken on windows still.
DLL load failed while importing _pywhispercpp: The specified module could not be found.
File "C:\Users\user\Desktop\faster-whisper\main.py", line 1, in <module>
from pywhispercpp.model import Model
ImportError: DLL load failed while importing _pywhispercpp: The specified module could not be found.```
Any advice would be helpful. I tried adding the whisper.dll as advised in issue 34, it didn't fix it. Reinstalled the package, same issue.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (25 by maintainers)
Commits related to this issue
- whisper.dll #44 — committed to absadiki/pywhispercpp by absadiki 2 years ago
Yes maybe. That’s a good thing anyways 😃
The wheel from PyPi. I tried it first. I was shocked how it instantly worked 😂
Always Windows like this 😅
I think it’s the famous
whisper.dllfile as usual. However, pulling the latest changes should resolve it basically. The GitHub action for windows completed successfully as well, and here is the resulting wheel for Python 3.12.wheel.zipI tried cloning from git and installing the latest build.
Seems like the windows install is extremely finicky
Thank you for the kind words. Let me try that new wheel you made and report back!
It’s okay, Thanks for the time you put into this. I believe the folder is correct, at least based on yesterday’s debugging.
I think your script will still work if someone installs the library from PyPI. Until the next release, the whisper.dll should go into the lib folder so it will be loaded at runtime.
Thank you very much for taking the time to write the fix, it’s not disgusting at all 😅 But, we need to find a way to include the dll -against which the package was built- with the wheel.
Let’s keep this issue open, others will find the script useful for sure, at least until a good fix is pushed.
Ok, so I miss-read what was written and put the DLL in
pywhispercpp’s folder, it works insite-packagesHowever, this is a ABSOLUTELY DISGUSTING FIX so being the Python developer I am, I wrote a EQUALLY DISGUSTING fix.
This auto installs it to site-packages. And in the event you do want to include this as a helper script, I’m licensing it also under the MIT license. It’s my way of saying thanks for developing pywhispercpp 😃
Edit:
I just realized this worked for me because I had whisper.dll installed manually. The original script would break otherwise. Here’s a revised version for anyone stumbling upon this: