For those of you running Windows machines like me:
I ran into an issue where a library that is clearly installed on my PC and listed in my requirements.txt
is not being installed and/or found when running my job build_and_test
venv/lib/python3.8/site-packages/soundfile.py:142: in <module>
raise OSError('sndfile library not found')
E OSError: sndfile library not found
However, I see on PyPi documentation that Linux machines have to install the SoundFile library with the command sudo apt-get install libsndfile1
.
What this means for us windows users is that pip install soundfile
will not be sufficient because the docker that is running your code is Linux based. Therefore you must add sudo apt-get install libsndfile1
as a command to you config.yml
file:
- run:
name: run tests
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
sudo apt-get install libsndfile1
pytest -v --cov
Hope this helps a noob like me!