-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
portaudio.h: No such file or directory #9896
Comments
The issue is not related to WSL. Please report any on-topic issues. The portaudio.h file is provided by portaudio19-dev package. The file list of that package can be found here https://packages.ubuntu.com/jammy/amd64/portaudio19-dev/filelist. |
It is my understanding that portaudio is provied by standard Ubuntu package and that WSL supplies a non standerd Ubuntu for the WSL support. The files referenced are not present in my Ubuntu 22.04 image under WSL2 with Windows 11. |
The portaudio19-dev has to be installed to get that portaudio.h file. |
@EdSeymore you need to add the |
Thanks. Now Successfully installed PyAudio-0.2.13. |
Now I am getting a stream of messages from ALSA lib: ALSA lib confmisc.c:855:(parse_card) cannot find card '0' This may not be an WSL2 problem; but, I am trying really hard to use WSL2 with Ubuntu in place of a separate Ubuntu system and the complexity of the Operating Systems is making this really difficult. End users should not have this much trouble setting up a working environment to run python applications. Trying to debug configuration problems with web search has not been productive for me. I really have no idea how Windows and Ubuntu share devices on a single system and very little desire to know. I just would like for supportted systems to actually work when installed. WSL2 just happens to be a key component. Has anyone gotten PyAudio to work on Ubuntu 22.04 with Windows 11 and WSL2 without the ALSA lib messages? Suggestions would be appreciated. |
The python3 code to illistrate this conditions is as follows: #!/usr/bin/env python3 -- coding: utf-8 --import pyaudio |
I am having the same issue. Has there been any update regarding this please? |
At the time being, has anyone succeeded to have pyaudio working in WSL2? |
^^ |
I am dealing with this same pyaudio situation... I have tried, installing portaudio, wheels, through pip, apt etc none of the workarounds I have found so far have worked for me |
I got it to work on wsl-nixos by doing setting so it is possible but unsure what it would look like for other distros |
didn't work for me on 2204 tho |
fixed it again on another wsl of mine, if you having the same pyaudio installation issue, the below instruction should help, especially, FIRSTLY installing portaudio and python3-dev, this additional detail is from the pypi guidelines for pyaudio
One more thing, I got ALSA errors when I tried to play sound in my app after fixing the pyaudio install... installing pulseaudio on wsl however fixed that problem... |
Any solutions to this yet? |
Windows Version
Microsoft Windows [Version 10.0.22621.1413]
WSL Version
WSL version: 1.1.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.90.1-microsoft-standard-WSL2
Distro Version
Release: 22.04
Other Software
miniconda conda 23.3.1
pip3 pip 23.0.1
PyAudio
Repro Steps
pip3 install PyAudio
Expected Behavior
normal PyAudio install as under native Ubuntu 22.04
Actual Behavior
fatal error: portaudio.h: No such file or directory
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: