I'm trying to put PyAudio on Windows (yes, I know. It is the worst trying to do such) and I've hit a wall. I'm using Python 3.4 64 bit on Windows 10. Knowing the issues with PyAudio's Windows support I downloaded the Windows binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio. More specifically - PyAudio‑0.2.8‑cp35‑none‑win_amd64.whl. After extracting the file I copied the contents into site-packages and just to try copied the entire folder into site-packages (with contents) and changed the folder name to PyAudio. The contents are:
pyaudio.py
_portaudio.cp35-win_amd64.pyd
PyAudio-0.2.8.dist-info(folder){
DESCRIPTION.rst
METADATA
metadata.json
pbr.json
RECORD
top_level
WHEEL }
However, when I try to run PyAudio I get the following import error "No module named '_portaudio'" when it attempts to import as shown below.
try:
import _portaudio as pa
except ImportError as e:
print(e)
print("Please build and install the PortAudio Python " +
"bindings first.")
sys.exit(-1)
So, to attempt to fix the error I renamed the pyd to _portaudio and went into the pyd to change the name to _portaudio before the PYInit__portaudio call as well. However, in doing that it attempts to read it as a 32 bit version and gives me the error "DLL load failed: %1 is not a valid Win32 application". Unfortunately, I can't copy and paste _portaudio.cp35-win_amd64 as an import in pyaudio.py because the syntax attempts to resolve the - as a statement. From this point I can't think of anything else to get it working. Any tips would be awesome, thanks!
EDIT: I intentionally put the statement (yes, I know. It is the worst trying to do such) in the post because I know that a linux environment would be a better choice but it wasn't an option. I just didn't want to get comments or answers suggesting I run my project on Ubuntu so please don't remove it. :)