I've installed Anaconda with the pkg installer:
Python 2.7.10 |Continuum Analytics, Inc.| (default, May 28 2015, 17:04:42) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://binstar.org
but when I attempt to use anything from matplotlib, i.e.:
from matplotlib import pyplot as plt
I get
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.
I'm really not sure what this means, or how to go about fixing it.
Getting Anaconda Or download the latest version of Anaconda and run the following command to install Python 3.5 (or 3.6) in the root environment: conda install python=3.5 or conda install python=3.6 . Or download the most recent Anaconda installer that included Python 3.5 (Anaconda 4.2. 0) or Python 3.6 (Anaconda 5.2.
Installing the Anaconda platform will install the following: Python; specifically the CPython interpreter that we discussed in the previous section. A number of useful Python packages, like matplotlib, NumPy, and SciPy. Jupyter, which provides an interactive “notebook” environment for prototyping code.
You can just go ahead and say "Ok" You will get anaconda distribution installed alongside your normal python IDLE. Your python installation should still work, like mine it works well.
Posting since I just had this issue and this was a quick fix:
If you used pip to install:
Create ~/.matplotlib/matplotlibrc
Add "backend: TkAgg
" (without the quotations) to the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With