feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change
on this file since 693de50 was
6d4802f,
checked in by Paul Brossier <piem@piem.org>, 6 years ago
|
[doc] add a note about building the module in double precision
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Rev | Line | |
---|
[68daf5b] | 1 | .. _python-install: |
---|
[d44763f] | 2 | |
---|
[68daf5b] | 3 | Installing aubio for Python |
---|
| 4 | =========================== |
---|
[34abeaf] | 5 | |
---|
[d44763f] | 6 | The aubio extension for Python is available for Python 2.7 and Python 3. |
---|
| 7 | |
---|
[5417b3a] | 8 | Installing aubio with pip |
---|
| 9 | ------------------------- |
---|
[241e2fb] | 10 | |
---|
[a9a1e79] | 11 | aubio can now be installed using ``pip``: |
---|
[d44763f] | 12 | |
---|
[3d8a6c0] | 13 | .. code-block:: console |
---|
[241e2fb] | 14 | |
---|
| 15 | $ pip install aubio |
---|
| 16 | |
---|
[34abeaf] | 17 | Building the module |
---|
| 18 | ------------------- |
---|
| 19 | |
---|
| 20 | From ``aubio`` source directory, run the following: |
---|
| 21 | |
---|
[3d8a6c0] | 22 | .. code-block:: console |
---|
[34abeaf] | 23 | |
---|
[241e2fb] | 24 | $ ./setup.py clean |
---|
[34abeaf] | 25 | $ ./setup.py build |
---|
| 26 | $ sudo ./setup.py install |
---|
| 27 | |
---|
[6d4802f] | 28 | |
---|
| 29 | .. _py-doubleprecision: |
---|
| 30 | |
---|
| 31 | Double precision |
---|
| 32 | ---------------- |
---|
| 33 | |
---|
| 34 | This module can be compiled in double-precision mode, in which case the |
---|
| 35 | default type for floating-point samples will be 64-bit. The default is |
---|
| 36 | single precision mode (32-bit, recommended). |
---|
| 37 | |
---|
| 38 | To build the aubio module with double precision, use the option |
---|
| 39 | `--enable-double` of the `build_ext` subcommand: |
---|
| 40 | |
---|
| 41 | .. code:: bash |
---|
| 42 | |
---|
| 43 | $ ./setup.py clean |
---|
| 44 | $ ./setup.py build_ext --enable-double |
---|
| 45 | $ pip install -v . |
---|
| 46 | |
---|
| 47 | **Note**: If linking against `libaubio`, make sure the library was also |
---|
| 48 | compiled in :ref:`doubleprecision` mode. |
---|
| 49 | |
---|
| 50 | |
---|
[f8bf0c2] | 51 | Checking your installation |
---|
| 52 | -------------------------- |
---|
[5417b3a] | 53 | |
---|
[109ba42] | 54 | Once the python module is installed, its version can be checked with: |
---|
| 55 | |
---|
| 56 | .. code-block:: console |
---|
| 57 | |
---|
| 58 | $ python -c "import aubio; print(aubio.version, aubio.float_type)" |
---|
| 59 | |
---|
| 60 | The command line `aubio` is also installed: |
---|
| 61 | |
---|
| 62 | .. code-block:: console |
---|
| 63 | |
---|
| 64 | $ aubio -h |
---|
[34abeaf] | 65 | |
---|
[5417b3a] | 66 | |
---|
| 67 | Python tests |
---|
| 68 | ------------ |
---|
| 69 | |
---|
| 70 | A number of `python tests`_ are provided. To run them, use |
---|
| 71 | ``python/tests/run_all_tests``. |
---|
| 72 | |
---|
| 73 | .. _demo_filter.py: https://github.com/aubio/aubio/blob/master/python/demos/demo_filter.py |
---|
[d44763f] | 74 | .. _python tests: https://github.com/aubio/aubio/blob/master/python/tests |
---|
Note: See
TracBrowser
for help on using the repository browser.