source: doc/python_module.rst @ ff87a67

feature/cnnfeature/crepefeature/timestretchfix/ffmpeg5
Last change on this file since ff87a67 was 007c0a1, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[doc] move api references to doc, simplify pip instructions, add conda section

  • Property mode set to 100644
File size: 2.8 KB

Installing aubio for Python

aubio is available as a package for Python 2.7 and Python 3. The aubio extension is written C using the Python/C and the Numpy/C APIs.

For general documentation on how to install Python packages, see Installing Packages.

Installing aubio with pip

aubio can be installed from PyPI using pip:

$ pip install aubio

See also Installing from PyPI for general documentation.

Note

aubio is currently a source only package, so you will need a compiler to install it from PyPI. See also Installing aubio with conda for pre-compiled binaries.

Installing aubio with conda

Conda packages are available through the conda-forge channel for Linux, macOS, and Windows:

$ conda config --add channels conda-forge
$ conda install -c conda-forge aubio

Double precision

This module can be compiled in double-precision mode, in which case the default type for floating-point samples will be 64-bit. The default is single precision mode (32-bit, recommended).

To build the aubio module with double precision, use the option --enable-double of the build_ext subcommand:

$ ./setup.py clean
$ ./setup.py build_ext --enable-double
$ pip install -v .

Note: If linking against libaubio, make sure the library was also compiled in :ref:`doubleprecision` mode.

?

Checking your installation

Once the python module is installed, its version can be checked with:

$ python -c "import aubio; print(aubio.version, aubio.float_type)"

The command line aubio is also installed:

$ aubio -h

Python tests

A number of Python tests are provided in the python tests. To run them, install nose2 and run the script python/tests/run_all_tests:

$ pip install nose2
$ ./python/tests/run_all_tests
Note: See TracBrowser for help on using the repository browser.