s0d3s / PyAudioWPatch

🐍 PyAudio | PortAudio fork with WASAPI loopback support 🔊 Record audio from speakers on Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not import the PyAudio C module '_portaudiowpatch'.

SethTurin opened this issue · comments

Hi

I'm running into an error and I've burned several hours on it with no progress.

I'm using windows 11 with an embeddable python installation. I get the same error with python 3.7 and python 3.11. I do not get the error with a normal python installation, which leads me to believe the issue has something to do with the embeddable installation. The error does not occur with pyaudio.

Here's the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\x\AppData\Roaming\app\python\Lib\site-packages\pyaudiowpatch\__init__.py", line 132, in <module>
    import _portaudiowpatch as pa
ImportError: DLL load failed: The specified module could not be found.```

Any thoughts?
commented

Hi🖐

Judging by the error, you are missing a compiled C extension of PyAudioWPatch.

These are the consequences of an incorrect installation. How did you install the library? Using pip or manually?

Try to reinstall using this command:

pip install --upgrade --force-reinstall --no-cache-dir pyaudiowpatch

If there are still problems after that:

  • post the output of the previous(☝) command here
  • check if you have file _portaudiowpatch.cp3*.pyd on path /path/to/python_dir/Lib/site-packages/

P.S. I rechecked on python 3.7 (with a full reinstall), no problems.

Hey sorry for the delay in answering this. The files are all definitely there, and I know I installed it correctly because it works fine with my full installation of python. This might be a bug in the embedded python distribution, but I'm not really sure how to even address it.

Hi, how did you resolved this problem?

Solved! For some reason I was using Python3.7 for 32bit systems despite my system being 64bit '-'

Solved! For some reason I was using Python3.7 for 32bit systems despite my system being 64bit '-'

so you had the same issue and resolved it by using the 64 bit distribution?

yes, my system is 64bit, so i had to use the python for 64 bit systems