Python can't import Whisper - ctypes.util.find_library('c') returns None

I use PyCharm on Windows 10 and run "Python 3.9.9". It's my code. I want to import whisper but get error in whisper.py line 70. I have checked that line: libc_name = ctypes.util.find_library('c'). find_library function can't find 'c' library and returns None. How can I find libc and give absolute path or directory to find_library function?

main.py

import whisper if __name__ == '__main__': model = whisper.load_model("base") result = model.transcribe("turkce.mp3") print(result["text"]) 

Error:

C:\Users\root\AppData\Local\Microsoft\WindowsApps\python3.9.exe D:\PycharmProjects\SpeechToText\main.py None Traceback (most recent call last): File "D:\PycharmProjects\SpeechToText\main.py", line 1, in <module> import whisper as wp File "C:\Users\root\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\whisper.py", line 70, in <module> libc = ctypes.CDLL(libc_name) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__ if '/' in name or '\\' in name: TypeError: argument of type 'NoneType' is not iterable Process finished with exit code 1 

I have tried uninstall whisper and reinstall from github;

pip uninstall whisper pip install git+ 

3

1 Answer

I have solved this exact problem by running a new environment in anaconda and reinstalling modules as an original environment did not accept the modules. As it is only my second day in coding, I am not sure what really helped but the original environment still does not work. I hope it helps.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like