Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda Runtime Error: Python is not installed as a framework?

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.

like image 926
Mark Brown Avatar asked Jul 12 '15 22:07

Mark Brown


People also ask

How do I install Python on Anaconda?

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.

Do I need to install Python if I installed Anaconda?

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.

Can I install Anaconda after installing Python?

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.


1 Answers

Posting since I just had this issue and this was a quick fix:

If you used pip to install:

  1. Create ~/.matplotlib/matplotlibrc

  2. Add "backend: TkAgg" (without the quotations) to the file.

like image 189
Jared Wilber Avatar answered Oct 05 '22 19:10

Jared Wilber