Install Acoular#

Acoular runs under 64-bit Linux, MacOS and Windows. It currently supports Python 3.11, 3.12, 3.13 and 3.14.

Tools#

There are many different tools for Python environment management and package installation. Select your preferred method by clicking on one of the tabs below.

“An extremely fast Python package and project manager, written in Rust.”

This method only requires an installation of uv itself. Choose this for a beginner-friendly and streamlined experience.

“The PyPA recommended tool for installing Python packages.”

This method requires Python and an installation of pip. Choose this for a traditional Python experience.

“The fast cross-platform package manager.”

This method only requires an installation of mamba itself. Choose this if you rely on Anaconda and want a fast experience.

“OS-agnostic, system-level binary package and environment manager.”

This method only requires an installation of conda itself. Choose this if you rely on Anaconda.

Virtual environment#

We strongly encourage the use of virtual environments. An environment my-env can be created with:

$ uv venv

Note

uv will handle environment activation implicitly (the environment is created at .venv).

$ python3 -m venv my-env

and activate the environment with:

$ source my-env/bin/activate
$ mamba create -n my-env

and activate the environment with:

$ mamba activate my-env
$ conda create -n my-env

and activate the environment with:

$ conda activate my-env

Installation#

Then, install Acoular with:

$ uv pip install acoular
$ pip install -U acoular
$ mamba install -c acoular acoular
$ conda install -c acoular acoular

Dependencies#

Acoular depends on the following packages which will be installed automatically (unless they are already installed):

Package

Function

Numba

Automatic JIT-compilation of performance critical computations.

NumPy

Array data types for efficient block processing.

scikit-learn

L1-optimization algorithms.

SciPy

Optimization and linear algebra algorithms.

PyTables

HDF5-support for caching and file I/O.

Traits

Type-checking and trait-change notifications for lazy-evaluation.

Optional dependencies#

Optional dependencies are only required in some circumstances. They must be installed separately when needed.

Package

Needed for

Matplotlib

Running the examples and to generate output in the demo.

python-sounddevice

Using input from physical soundcard hardware.

PyLops

Some solvers of BeamformerCMF.

When installing Acoular from PyPI, Acoular and all optional dependencies can be installed with the full extra:

Otherwise, the dependencies need to be installed manually:

$ uv pip install 'acoular[full]'
$ pip install -U 'acoular[full]'
$ mamba install -c acoular acoular matplotlib pylops python-sounddevice
$ conda install -c acoular acoular matplotlib pylops python-sounddevice

Verify your installation#

After installation, you may verify your Acoular installation by importing the module and running the Acoular demo script in a Python console. In order to render the graphical output, the Acoular demo script requires matplotlib.

$ uv run python -m acoular.demo
$ python -m acoular.demo
$ python -m acoular.demo
$ python -m acoular.demo

After a couple of seconds, this should produce two pictures (a 64 microphone arrangement and a beamforming map with three sources). If matplotlib is not found, the beamforming map will be printed in ASCII format.

Known Issues#

Using conda with the defaults channel on Linux (Python 3.13)#

Recently, we have encountered some issues with the installation of Acoular via conda using the defaults channel. On Linux and for Python version 3.13, the following error may occur after importing Acoular:

ImportError: traits/ctraits.cpython-313-x86_64-linux-gnu.so: undefined symbol: Py_TRASHCAN_SAFE_BEGIN

Therefore, we recommend either installing Acoular with another tool, or using a different Python version (3.10, 3.11, 3.12) when installing via conda. Alternatively, install the traits package from the conda-forge channel to fix the error with:

$ conda update -c conda-forge traits

Missing PortAudio on Linux#

The sounddevice library depends on PortAudio which might not be installed on Linux. On Ubuntu, for example, you can install PortAudio with:

$ sudo apt install libportaudio2