Compiling pyo from sources

Here is how you can compile pyo from sources on Linux and MacOS (if you are interested in the adventure of compiling pyo from sources on Windows, you can take a look at my personal notes in windows-7-build-routine.txt).


To compile pyo with all its features, you will need the following dependencies:

Getting sources

You can download pyo’s sources by checking out the source code here:

git clone


Please note that under MacOS you will need to install the Apple’s developer tools to compile pyo.

Once you have all the required dependencies, go in pyo’s directory:

cd path/to/pyo

And build the library:


sudo python install

Debian & Ubuntu:

sudo python install --install-layout=deb

You can customize your compilation by giving some flags to the command line.

Compilation flags

If you want to be able to use coreaudio (MacOS):


If you want JACK support (Linux, MacOS):


If you want to be able to use a 64-bit pyo (All platforms, this is the sample resolution, not the architecture), this will build both single and double precisions:


If you want to disable most of messages printed to the console:


If you want to compile external classes defined in pyo/externals folder:


By default, debug symbols are off. If you want to compile pyo with debug symbols:


By default, optimizations are activated. If you want to compile pyo without optimizations:


If you want to compile pyo with minimal dependencies (mostly for integrated use in a host environment):


This will compile pyo without portaudio, portmidi and liblo support.

Compilation scripts

In the ./scripts folder, there is some alternate scripts to simplify the compilation process a little bit.

To compile both 32-bit and 64-bit resolutions on linux (with jack support):

sudo sh scripts/

To compile both 32-bit and 64-bit resolutions on macOS (without Jack):

sudo sh scripts/

To compile both 32-bit and 64-bit resolutions on macOS (with Jack):

sudo sh scripts/

Debian & Ubuntu (apt-get)

Under Debian & Ubuntu you can type the following commands to get pyo up and running:

sudo apt-get install libjack-jackd2-dev libportmidi-dev portaudio19-dev liblo-dev
sudo apt-get install libsndfile-dev python-dev python-tk
sudo apt-get install python-imaging-tk python-wxgtk3.0
git clone
cd pyo
sudo python install --install-layout=deb --use-jack --use-double
  • On Ubuntu system prior to vivid, wxpython 3.0 must be compiled from sources.

MacOS (Homebrew)

Under macOS, it is very simple to build pyo from sources with the Homebrew package manager.

First, install Python and WxPython from the binary installers.

Second, you need to install Homebrew. Then, in a terminal window:

brew install liblo libsndfile portaudio portmidi --universal
git clone
cd pyo
python install --use-coreaudio --use-double