无法在OS X的PyCharm中安装"pyaudio" [英] Trouble installing 'pyaudio' in PyCharm on OS X

查看:71
本文介绍了无法在OS X的PyCharm中安装"pyaudio"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试在我的PyCharm IDE中安装"pyaudio"模块.但是通过项目解释器进行安装会导致以下错误:

src/_portaudiomodule.c:29:10:致命错误:找不到"portaudio.h"文件

有谁知道如何解决这个问题?我还尝试安装其他版本,但是每次安装失败.

解决方案

我解决该问题的方法是,在以下位置安装Python2.7的新副本

 <代码>/usr/local/bin/python2.7 

,然后在PyCharm偏好设置下将其选为我的项目翻译.使用PyCharm的内部软件包管理器仍然会向我抛出错误消息,但是到目前为止,我可以通过OSX终端使用pip软件包管理器,而没有任何问题.

例如

  pip2.7安装opencv 

I recently tried to install the 'pyaudio' module in my PyCharm IDE. But the installation via the project interpreter results in the following error:

src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found

Does anyone know how to fix this problem? I also tried to install different versions, but every time it failed.

解决方案

The way I fixed it, was installing a fresh copy of Python2.7 under

/usr/local/bin/python2.7

And selected that as my Project Interpreter under the PyCharm preferences. Using the internal package manager of PyCharm still throws me error messages, but I'm capable of using the pip package manager through the OSX terminal with no problems so far.

e.g.

pip2.7 install opencv

这篇关于无法在OS X的PyCharm中安装"pyaudio"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆