source:
doc/python_module.rst
@
e2010b3
Last change on this file since e2010b3 was e893e6fe, checked in by , 6 years ago | |
---|---|
|
|
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 folder. To run them, install pytest and run it from the aubio source directory:
$ pip install pytest $ git clone https://git.aubio.org/aubio/aubio $ cd aubio $ pytest