forked from djfroofy/PyAudio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
88 lines (58 loc) · 2.86 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
======================================================================
PyAudio Compilation Hints
======================================================================
Here are some hints for compiling PortAudio and PyAudio on various
platforms:
* General UNIX Guide: (GNU/Linux, Mac OS X, Cygwin)
* Microsoft Windows (native)
Generally speaking, you must first install the PortAudio v19 library
before building PyAudio.
----------------------------------------------------------------------
General UNIX Guide (GNU/Linux, Mac OS X, Cygwin)
----------------------------------------------------------------------
1. Build and install PortAudio, i.e.:
% ./configure
% make
% make install # you may need to be root
(Or better yet, use your package manager to install PortAudio v19)
2. Extract PyAudio; to build and install, run:
% python setup.py install
----------------------------------------------------------------------
Microsoft Windows
----------------------------------------------------------------------
If you are targeting native Win32 Python, you will need either
Microsoft Visual Studio or MinGW (via Cygwin). Here are compilation
hints for using MinGW under the Cygwin build environment.
Note: I've only tested this under Cygwin's build environment. Your
mileage may vary in other environments (i.e., compiling PortAudio with
MinGW's compiler and environment).
(If you have instructions for building PyAudio using Visual Studio,
I'd love to hear about it.)
1. Download PortAudio to ./portaudio-v19 in this directory
and build. When running configure, be sure to use ``-mno-cygwin``
(under cygwin) to generate native Win32 binaries:
% cd ./portaudio-v19
% CFLAGS="-mno-cygwin" LDFLAGS="-mno-cygwin" ./configure
% make
% cd ..
2. To build PyAudio, run (from this directory):
% python setup.py build --static-link -cmingw32
Be sure to invoke the native Win32 python rather than cygwin's
python. The --static-link option statically links in the PortAudio
library to the PyAudio module, which is probably the best way to go
on Windows.
From: http://boodebr.org/main/python/build-windows-extensions
Update: 2008-09-10
Recent versions of Cygwin binutils have version numbers that are
breaking the version number parsing, resulting in errors like:
ValueError: invalid version number '2.18.50.20080625'
To fix this, edit distutils/version.py. At line 100, replace:
version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$',
re.VERBOSE)
with
version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? (\. (\d+))?$',
re.VERBOSE)
3. To install PyAudio:
% python setup.py install --skip-build
The --skip-build option prevents Python from searching your system
for Visual Studio and the .NET framework.