Fix Import soundfile: OSError: sndfile library not found Error – Python Tutorial

By | June 21, 2022

When we plan to use python soundfile to read audio in linux, we may get error: OSError: sndfile library not found. In this tutorial, we will introduce you how to fix.

First, we should know: sndfile is not a python package, you can not install it using pip install command.

This error is reported in soudfile.py:

soundfile OSError sndfile library not found

How to fix this error?

This error usually occurs in linux system. We should install libsndfile.

For example:

yum install libsndfile

Then we can find:

Fix Import soundfile: OSError: sndfile library not found Error - Python Tutorial

After you have installed it, you will find this error is fixed.

Leave a Reply