LoginSignup
18
6

More than 3 years have passed since last update.

WindowsでPyAudioがPython 3.7, 3.8, 3.9 にインストールできない場合の対処法

Posted at

2020年6月現在PyAudio公式版はWindowsのPython 3.6.Xまでしか対応していません。
https://pypi.org/project/PyAudio/#files

3.7以上でインストールしようとすると
"Microsoft Visual C++ 14.0 is required."
というエラーが出ますが、エラーに従ってMicrosoft C++ Build ToolsをインストールしてもPyAudioの依存関係の設定が上手くいっておらず、インストールできません。

3.7以上でPyAudioを使うには非公式版ですが
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
からバージョンに対応したwhlファイルをダウンロードしてインストールすれば使えます。例えばPython 3.8 on x86-64なら

py -m pip install PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl

でインストールできます。動作は問題ありませんでした。
公式版ならWindows版Python3.6.Xを使うのが無難です。
Microsoft C++ Build Toolsをインストールしても結果には関係ありませんのでご注意ください。そのような誤った記事が多くありました。

18
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
6