I'm attempting to use rubberband and coming across errors I haven't seen before, nor know how to resolve.
First, I installed via terminal with both pip and pip3. rubberband appears in pip freeze and pip3 freeze as version 0.2.0.
When I import rubberband the python editor in terminal, the common error is returned:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named rubberband
When I import rubberband the python3 editor in terminal, the unusual error is returned. (This error also appears during import in jupyter notebook):
>>> import rubberband
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rubberband.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/lib/libsndfile.1.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rubberband.cpython-37m-darwin.so
Reason: image not found
I think it is notable that import in python and python3 returns different error messages. From there, I am having trouble troubleshooting.
Thanks in advance!
Edit: Tharun K commented to check the dependencies: librubberband and libsndfile. Below are the error messages returned when attempting to install librubberband. (same errors applied for libsndfile)
$ pip3 install librubberband
ERROR: Could not find a version that satisfies the requirement librubberband (from versions: none)
ERROR: No matching distribution found for librubberband
$ python3 -m pip install "librubberband==1.8"
ERROR: Could not find a version that satisfies the requirement librubberband==1.8 (from versions: none)
ERROR: No matching distribution found for librubberband==1.8
$ python3 -m pip install "librubberband~=1.8"
ERROR: Could not find a version that satisfies the requirement librubberband~=1.8 (from versions: none)
ERROR: No matching distribution found for librubberband~=1.8
Edit 2: Solution from Tharun K "Michael, firstly, I'd mentioned libsamplerate and libsndfil formulae.brew.sh/formula/libsndfile formulae.brew.sh/formula/libsamplerate – Tharun K"
libsamplerate and libsndfil needed to be installed with brew.