Jax Teller
Jax Teller

Reputation: 173

Installing PyAudio in PyCharm on Windows

First of all my project is setup with venv and please note that I am unable to use conda.

I am having issues installing PyAudio via PyCharms on Windows. I have compiled the PortAudio files by myself following various other guides. Now I am trying to install it via the Python Interpreter in PyCharm and can't get it to work. Have tried adding the Include directory in the options via --global-option="-I/path-here", doesn't get recognized, same with adding it to the Interpreter Paths.

src/_portaudiomodule.c(29): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "portaudio.h": No such file or directory

I've had no issues on Linux, since installing PortAudio is simple and the PyAudio installation then works via PyCharm.

Upvotes: 1

Views: 1743

Answers (3)

bluesky
bluesky

Reputation: 255

Part 1. In PyCharm:

  • go to "File";
  • "Settings";
  • "Project";
  • push this button ">" enter image description here;
  • "Python interpreter";
  • push a gear wheel button enter image description here;
  • "Add";
  • "System Interpreter";
  • choose python version installed on your system;
  • If you see "PyAudio" in the list it's mean that you finished. If you don't see PyAudio then go to part 2.

Part 2. For windows 10:

  • push "Start" button;
  • right mouse button click on "This PC";
  • "Properties";
  • "Advanced system settings";
  • "Environment Variables";
  • in "User Variables" double click on "Path";
  • make sure that paths "python3.x.x/script" and "python3.x.x" for your python version (which you choose in the part 1 of this instruction) are on the top of your list. If not, click "Move up" button enter image description here ;
  • push "Ok" buttons.

Part 3. Installing PyAudio

Go to "Start" -> "cmd" -> type "pip install pyaudio" and push "Enter" button. That's all.

Upvotes: 0

Purujit Kulshreshtha
Purujit Kulshreshtha

Reputation: 39

You can manually download the PyAudio module and install it from here: https://pypi.org/project/PyAudio/#files

Upvotes: 0

Jax Teller
Jax Teller

Reputation: 173

So, whilst writing this in complete desparation and before I throw the effort away: I switched to Python 3.6 (was using 3.7), installed PyAudio on first try without any problems. So if anyone comes across this problem, please try this. It even says that PyAudio Version 0.2.11 only supports Python up to 3.6.

Upvotes: 1

Related Questions