bastibe / SoundCard

A Pure-Python Real-Time Audio Library
https://soundcard.readthedocs.io
BSD 3-Clause "New" or "Revised" License
659 stars 71 forks source link

Issue importing soundcard #121

Open UltimateDucc opened 3 years ago

UltimateDucc commented 3 years ago

Importing soundcard: import soundcard as sc

Error when the program is run: Exception has occurred: OSError ctypes.util.find_library() did not manage to locate a library called 'ole32'

Python version is 3.8

bastibe commented 3 years ago

What version of Windows are you running? ole32 should be available in Windows 7, 8, 10.

UltimateDucc commented 3 years ago

I am running on Windows 10.

UltimateDucc commented 3 years ago

I also have multiple files called 'ole32.dll' installed on my system

bastibe commented 3 years ago

Frankly, I don't know Windows' internals particularly well, and don't know why ole32 is not available on your system. But here are a few things you can try:

Perhaps your Python is 32 bit and your ole32 is 64 bit?
Perhaps your Python is somehow configured to not search system libraries?
Perhaps you need to install some Visual C++ Redistributable?

Sorry to not being able to help...

UltimateDucc commented 3 years ago

My python is 64-bit. Which Visual C++ Redistributable are affected/installed?

bastibe commented 3 years ago

I don't know. It was just an idea. As far as I know, you shouldn't need any of them, but I don't have a clean install of Windows here to test.

I would think that perhaps this is some kind of path issue. Is your ole32.dll in a directory that is part of your $PATH environment variable?

UltimateDucc commented 3 years ago

There is no ole32 in the directories, where should I get ole32.dll from and where should I put it?

bastibe commented 3 years ago

It is usually in C:\Windows\System32, which should be on $PATH.