Matplotlib Runtime Error resolution

When I tried to use matplotlib from Python3 installed by pyenv, the following error occurred.

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 Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ

As a result of investigation, similar symptoms were found. I changed the backend of matplotlib rendering by referring to here.

The procedure is as follows.

  1. Create a file named matplotlibrc in ~ / .matplotlib.
  2. Add the following line to ~ / .matplotlib / matplotlibrc.

~/.matplotlib/matplotlibrc


backend: TkAgg

Now when I try to run the program using matplotlib again, it works.

Recommended Posts

Matplotlib Runtime Error resolution
polyfit error when installing matplotlib
Error resolution python version check
How to suppress display error in matplotlib
Error resolution when installing numba on macOS
Solution for run-time error in OpenVINO IEPlugin.load ()
Linux "Install on / dev / sda" error resolution