Brandon Allbery allbery.b at
Sun Jul 10 09:45:58 PDT 2016

On Sat, Jul 9, 2016 at 2:21 PM, Daniel R. Marlow <marlow at>

> appeared to go just fine, but when I run python and try to import pyaudio,
> I get an  “ImportError: No module name pyaudio” message.
>      Is there a PYTHONPATH setting that I am missing?

If it happens to be pure Python and not dependent on Python build options,
it might work with Apple's python that way. But it is not intended for use
with Apple's python because no guarantees can be made. Mismatches will
manifest as a load error, or occasionally (if Python build options are
subtly wrong) a core dump.

MacPorts will have installed python under /opt/local/bin/pythonVER (at the
moment this should be python2.7); to use Python modules installed with
MacPorts, run that python. You can make it the default with:

    $ sudo port select --set python python27
    $ hash -r

brandon s allbery kf8nh                               sine nomine associates
allbery.b at                                  ballbery at
unix, openafs, kerberos, infrastructure, xmonad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list