This problem is encountered when using the Matplotlib drawing in a virtualenv environment:
>>> Import Matplotlib.pyplot as Plt
Traceback (most recent):
File "<stdin>", line 1, in <module>
...
In <module>
From matplotlib.backends import _macosx
Runtimeerror:python is not installed as a framework. The Mac OS X backend'll isn't able to function correctly if Python was not installed as a framework. See the Python documentation for more information on installing Python as a framework on MAC OS X. Either reinstall Python as a framework, or try one of the other backends. If you is working with Matplotlib in a virtual enviroment see ' Working with matplotlib in virtual environments ' in the Ma Tplotlib FAQ
It seems that the virtual environment is different from the installation configuration of the default environment.
After searching for the error message, a solution was found on Sto:
1, pip after installing Matplotlib, a. Matplotlib directory will be generated under the root directory:
? Bin LL ~/.matplotlib
Total 280
-rw-r--r--1 Me staff 78K 4 Fontlist.cache
-rw-r--r--1 Me staff 59K 1 15:56 fontList.py3k.cache
Drwxr-xr-x 2 Me staff 68B 4 Tex.cache
2. Create a file named Matplotlibrc in this directory with the following contents:
Backend:tkagg
Then save exit, restart the Python interface, or rerun the script, import to execute normally.
Sto answer address: Http://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python
Runtimeerror:python is not installed as a framework error solution