Help#

Here you find help, if you are having trouble with pyfar.

Installation#

You can use pip to install any pyfar package. For example the base package pyfar is installed by

$ pip install pyfar

(Requires Python 3.8 or higher)

Reading and writing audio files is supported through SoundFile, which is based on libsndfile. On Windows and OS X, it will be installed automatically. On Linux, you need to install libsndfile using your distribution’s package manager, for example

$ sudo apt-get install libsndfile1

Best practice#

We recommend to install pyfar into a virtual python environment to avoid conflicts with already installed packages. The example below uses the Conda package manager. To create a new environment run

$ conda create --name MY_ENVIRONMENT python

Now activate the environment with

$ conda activate MY_ENVIRONMENT

After this, you can install pyfar into the environment as shown above. For more information we recommend the Managing environments tutorial.

Trouble shooting#

The installation fails#

Pyfar packages do not always work with the latest Python version. If the installation fails, try to restrict the Python version inside your environment, for example with

$ conda create --name pyfar python'<3.12'

Writing/reading audio files does not work#

Reading and writing audio files is supported through SoundFile, which is based on libsndfile. On Linux, you need to install libsndfile either from conda-forge

$ conda install -c conda-forge libsndfile

or using your distribution’s package manager, for example

$ sudo apt-get install libsndfile1

A pyfar package is installed but can not be imported#

Make sure that you have selected the correct virtual Python environment in which you installed pyfar. If you are using conda, you can activate an environment by

$ conda activate pyfar

in which ‘pyfar’ is the name of the environment. For more information on conda, we recommend the Managing environments tutorial.

Contact#

If the above did not help to resolve your problem, you can post an issue on GitHub. Please refer to the contribute section for more information.