Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'samplerate' #1840

Closed
todochenxi opened this issue May 15, 2024 · 4 comments
Closed

No module named 'samplerate' #1840

todochenxi opened this issue May 15, 2024 · 4 comments
Labels
wontfix Issues that we don't want to deal with: out of scope, intended behavior, deprecations, etc.

Comments

@todochenxi
Copy link

BEFORE POSTING A BUG REPORT Please look through existing issues (both open and closed) to see if it's already been reported or fixed!

Describe the bug
A clear and concise description of what the bug is.

No module named 'samplerate'

This error is lazily reported, having originally occured in
File /home/developer/anaconda3/envs/roleplay/lib/python3.10/site-packages/librosa-0.10.2.post1-py3.10.egg/librosa/core/audio.py, line 32, in

----> samplerate = lazy.load("samplerate")
To Reproduce

Expected behavior
I hope it works

Screenshots
If applicable, add screenshots to help explain your problem.

Software versions*

@todochenxi
Copy link
Author

I have solved this problem by compiling the source code

  1. download samplerate source code
    https://pypi.org/project/samplerate/#files
  2. tar -zxvf samplerate....
  3. cd samplerate
    pip install -r requirements.txt
    sudo apt-get install cmake
    python setup.py install
  4. import samplerate

@bmcfee bmcfee added the wontfix Issues that we don't want to deal with: out of scope, intended behavior, deprecations, etc. label May 15, 2024
@bmcfee
Copy link
Member

bmcfee commented May 15, 2024

This is behaving as expected - samplerate is an optional dependency, so it is not automatically installed when you install librosa. If you want to use it, you need to install it manually.

@bmcfee bmcfee closed this as completed May 15, 2024
@todochenxi
Copy link
Author

Thanks for your reply

@Tuesdaythe13th

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Issues that we don't want to deal with: out of scope, intended behavior, deprecations, etc.
Development

No branches or pull requests

3 participants