Mac OS 10.12.9 Python 3.6.* matplotlib 2.0.2
A handy tool for drawing graphs in python
Probably, if you try to use matplotlib without creating any config file, you will get the following error.
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.
I referred to this stack over flow. Installation Issue with matplotlib Python [duplicate]
Create a file called matplotlibrc under ~ / .matplotlib / and add the following code.
matplotlibrc
backend: TkAgg
If you save this, you will be able to import it immediately without any problems.
I got stuck in the same place about two years ago, I completely forgot and got the same error on my new mac.
Thank you for your hard work.
Recommended Posts