Skip to content

Commit bcc95af

Browse files
jerjouJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Add note for common osx problem. (GoogleCloudPlatform#763)
1 parent 0398b40 commit bcc95af

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

scripts/readme-gen/templates/install_portaudio.tmpl.rst

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,25 @@ Install `PortAudio`_. This is required by the `PyAudio`_ library to stream
55
audio from your computer's microphone. PyAudio depends on PortAudio for cross-platform compatibility, and is installed differently depending on the
66
platform.
77

8-
For Mac OS X, you can use `Homebrew`_::
8+
* For Mac OS X, you can use `Homebrew`_::
99

10-
brew install portaudio
10+
brew install portaudio
1111

12-
For Debian / Ubuntu Linux::
12+
**Note**: if you encounter an error when running `pip install` that indicates
13+
it can't find `portaudio.h`, try running `pip install` with the following
14+
flags::
1315

14-
apt-get install portaudio19-dev python-all-dev
16+
pip install --global-option='build_ext' \
17+
--global-option='-I/usr/local/include' \
18+
--global-option='-L/usr/local/lib' \
19+
pyaudio
1520

16-
Windows may work without having to install PortAudio explicitly (it will get
17-
installed with PyAudio).
21+
* For Debian / Ubuntu Linux::
22+
23+
apt-get install portaudio19-dev python-all-dev
24+
25+
* Windows may work without having to install PortAudio explicitly (it will get
26+
installed with PyAudio).
1827

1928
For more details, see the `PyAudio installation`_ page.
2029

speech/grpc/README.rst

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,25 @@ Install `PortAudio`_. This is required by the `PyAudio`_ library to stream
5353
audio from your computer's microphone. PyAudio depends on PortAudio for cross-platform compatibility, and is installed differently depending on the
5454
platform.
5555

56-
For Mac OS X, you can use `Homebrew`_::
56+
* For Mac OS X, you can use `Homebrew`_::
5757

58-
brew install portaudio
58+
brew install portaudio
5959

60-
For Debian / Ubuntu Linux::
60+
**Note**: if you encounter an error when running `pip install` that indicates
61+
it can't find `portaudio.h`, try running `pip install` with the following
62+
flags::
6163

62-
apt-get install portaudio19-dev python-all-dev
64+
pip install --global-option='build_ext' \
65+
--global-option='-I/usr/local/include' \
66+
--global-option='-L/usr/local/lib' \
67+
pyaudio
6368

64-
Windows may work without having to install PortAudio explicitly (it will get
65-
installed with PyAudio).
69+
* For Debian / Ubuntu Linux::
70+
71+
apt-get install portaudio19-dev python-all-dev
72+
73+
* Windows may work without having to install PortAudio explicitly (it will get
74+
installed with PyAudio).
6675

6776
For more details, see the `PyAudio installation`_ page.
6877

0 commit comments

Comments
 (0)