SoundCard icon indicating copy to clipboard operation
SoundCard copied to clipboard

Issue importing soundcard

Open UltimateDucc opened this issue 4 years ago • 8 comments

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

UltimateDucc avatar Jan 23 '21 14:01 UltimateDucc

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

bastibe avatar Jan 27 '21 08:01 bastibe

I am running on Windows 10.

UltimateDucc avatar Jan 27 '21 08:01 UltimateDucc

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

UltimateDucc avatar Jan 27 '21 08:01 UltimateDucc

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...

bastibe avatar Jan 27 '21 08:01 bastibe

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

UltimateDucc avatar Jan 27 '21 08:01 UltimateDucc

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?

bastibe avatar Jan 30 '21 14:01 bastibe

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

UltimateDucc avatar Jan 31 '21 04:01 UltimateDucc

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

bastibe avatar Feb 03 '21 07:02 bastibe