에러전문

RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.


원인

이 에러는 matplotlib 패키지에서 발생하는 에러입니다.

matplotlib에서 사용되는 backend가 제대로 설정되지 못하였기 때문에 발생합니다.



해결법

Mac의 터미널에서 이하의 명령어를 입력합니다.

echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc

아무 결과가 출력되지 않으면 제대로 된 것입니다.

이후에 다시 실행해보면 제대로 동작하는 것을 확인할 수 있습니다.

+ Recent posts