Librosa 설치 오류 및 soundfile library not found Error librosa 설치 오류Librosa를 처음 설치하다 보면, 아래와 같이 import도 되지 않는 상황이 종종 발생하곤 한다.아무리, pip 명령어를 만져봐도 시작부터 되지 않는 경우이다.sndfile library not found librosa는 내부적으로, scipy.wavefile과 sounfile 라이브러리를 사용하는데, soundfile 라이브러리 설치가 잘 안되서 발생하는 문제이다. soundfile library는 파이썬 외에 os차원에서 설치해야하는 library가 포함되어 있기 때문에, pip 및 종속성검사로 설치가 되지 않는다. Show Librosa 공식웹페이지 이외, Github Page를 참조하면, Soundfile을 설치할 때 다음과 같은 사전설치/업데이트가 필요하다고 가이드 되어 있다. (놓치기 쉽다. 그냥 `pip install librosa` 하기 때문)
또는,
MacOS의 경우
Conda를 사용하는 경우,
conda 가 지원하는 환경이라면, conda 최고~~~!!! 그런데, 이렇게 해 주어도 안되는 경우가 있다. 그렇다면 아래와 같이 해 주자. soundfile library를 다시 설치 해 주자.
간혹 설치 완료 후에도 여전히 에러가 발생하는 경우가 있는 Notebook을 재시작 해주면 해결 된다. ^^; 2018년 9월 20일 Python librosa, mac, pip, Python, Ubuntu 사용법음원 분석에 사용하는 라이브러리인 librosa를 설치하는 방법을 정리해둔다. 설치방법: Mac
설치방법: Ubuntu
관련Table of Contents #
Install librosa on Windows #To install the
If the command doesn't succeed, try running CMD as an administrator. Right-click on the search result, click on "Run as administrator" and run the pip install command. If you get the error "ModuleNotFoundError: No module named 'librosa' in Python", check out my other article:
If you get the error "'pip' is not
recognized as an internal or external command", use the
Alternatively, you can install the
If the
If you see an error message that "ps1 cannot be loaded because running scripts is disabled on this system", run the following command, type "yes" when prompted and rerun the activation command.
You can verify that the
The Install librosa on macOS or Linux #To install librosa on macOS or Linux:
If you get an error that
If you get a permissions error, prefix the command with
Alternatively, you can install the
Your virtual environment will use the version of Python that was used to create it. If the If you get the error "ModuleNotFoundError: No module named 'librosa' in Python", check out my other article:
You can use the
The Install librosa in Visual Studio Code #To install librosa in Visual Studio Code:
You can also open the terminal in Visual studio code by pressing When installing Python modules in Visual Studio code, make sure that your IDE is configured to use the correct version of Python. Press Then type "Python select interpreter" in the field. Then select the correct Python version from the dropdown menu. Your IDE should be using the same version of Python (including the virtual environment) that you are using to install packages from your terminal. You can use the
You can also try creating a virtual environment if you don't already have one.
Your virtual environment will use the version of Python that was used to create it. If you get the error "ModuleNotFoundError: No module named 'librosa' in Python", check out my other article:
Install librosa in PyCharm #To install librosa in PyCharm:
Alternatively, you can use the IDE itself to install the module. To install librosa in PyCharm:
When installing Python modules in PyCharm, make sure that your IDE is configured to use the correct version of Python. Click on "File" > "Settings" > "Project" > "Python Interpreter". Then select the correct Python version from the dropdown menu. Your IDE should be using the same version of Python (including the virtual environment) that you are using to install packages from your terminal. You can use the
Install librosa in Anaconda #You
can install the If you are on Windows, search for "Anaconda Prompt" and open the application. If you are on macOS or Linux, open your terminal. Run the following command to install the
If you get the error "ModuleNotFoundError: No module named 'librosa' in Python", check out my other article:
Install librosa in Jupyter Notebook #To install librosa in Jupyter Notebook:
Alternatively, you can use the Python ipykernel. To install librosa in Jupyter Notebook:
Note that the
Once you
type the command, click "Run" to install the If you get a permissions error, e.g. "[WinError: 5] Access is denied", add the
|