RuntimeError: Python is not installed as a framework.
RuntimeError: Python is not installed as a framework.
在Conda虚拟环境中运行matplotlib遇到异常提示:

似乎是因为虚拟环境与默认环境的安装配置不同造成的。
搜索错误信息之后,在STO上找到了解决方案:
1、pip安装matplotlib之后,会在根目录下产生一个.matplotlib的目录:
➜ bin ll ~/.matplotlib
total 280
-rw-r--r-- 1 me staff 78K 10 4 2015 fontList.cache
-rw-r--r-- 1 me staff 59K 1 17 15:56 fontList.py3k.cache
drwxr-xr-x 2 me staff 68B 10 4 2015 tex.cache
2、在这个目录下创建一个名为matplotlibrc的文件,内容是:
backend: TkAgg
然后保存退出,重启Python交互界面或重新运行脚本,import正常执行。
STO答案地址:http://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python
RuntimeError: Python is not installed as a framework.的更多相关文章
- matplotlib使用时报错RuntimeError: Python is not installed as a framework(一)
笔者在第一次安装matplotlib后运行时出现报错. import matplotlib as mlb from matplotlib import pylab as pl x = [1,3,5,7 ...
- RuntimeError: Python is not installed as a framework 错误解决方案
在virtualenv环境下使用matplotlib绘图时遇到了这样的问题: >>> import matplotlib.pyplot as pltTraceback (most r ...
- 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 infor
在virtualenv环境下使用matplotlib绘图时遇到了这样的问题: >>> import matplotlib.pyplot as pltTraceback (most r ...
- RuntimeError: Python is not installed as a framework 错误解决办法
因为我是macbook,mac是自带的python 2.7,但是我开发需要使用到的是python3,所以先使用pip3 install matplotlib 然后在交互页面键入import matpl ...
- 出现ImportError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly ....的解决方法
在terminal上运行gluoncv时遇到了一个报错问题. ImportError: Python is not installed as a framework. The Mac OS X bac ...
- pip install报错:RuntimeError: Python version >= 3.5 required
由于pip官方的不作为,现如今python2(以及某些低版本python3)配套的pip,已经没法正常的安装pypi包了. 例如需要用到的一套PyCaffe的代码,是基于Python2的,于是用min ...
- plugin python was not installed: Cannot download ''
problem: plugin python was not installed: Cannot download ''........ 1. the first method of resoluti ...
- Using Python with TurboGears A complete web framework integrating several Python projects
Using Python with TurboGears TurboGears is a Python web framework based on the ObjectDispatch paradi ...
- Python 学习笔记20 自定义robot Framework 关键字
Robot Framework 自定义关键字 Robot framework 自定义了一些关键字我们可以把他们当作函数在设计测试用例的时候使用. 同时RF也提供了许多第三方的库,我们可以自己下载使用. ...
随机推荐
- Hibernate:查询
本文内容 OID查询 对象导航查询 HQL查询 QBC查询 SQL查询 首发日期:2018-07-31 hibernate的查询方式: hibernate有很多查询方式 OID查询 对象导航查询: H ...
- ssh框架总结之action接收参数的三种方式
页面将参数传递给action的三种方式 一是通过属性传值: 将页面和action的的属性值保持一致,在action上写上该属性的set和get方法,这样在页面提交参数的时候,action就会调用set ...
- ASP.NET MVC之从控制器传递数据到视图方式
为了演示,先定义一个类 新建基本项目在Models文件夹下定义如下类: public class Person { public int Id { get; set; } public string ...
- Unity Editor 下创建Lua和Text文件
预览 在Project视图中,扩展右键菜单,右键 – Create - Text File 创建一个Text文件,或者Lua文件. 关键点 获取当前选择的路径,以Assets路径开头 var sele ...
- JavaScript -- 时光流逝(四):js中的 Math 对象的属性和方法
JavaScript -- 知识点回顾篇(四):js中的 Math 对象的属性和方法 1. Math 对象的属性 (1) E :返回算术常量 e,即自然对数的底数(约等于2.718). (2) LN2 ...
- June 14. 2018 Week 24th Thursday
Good friends, good books, and a sleepy conscience: this is the ideal life. 拥有益友.良书和一颗宁静的内心:这就是理想的生活. ...
- February 25th, 2018 Week 9th Sunday
LIfe is about making an impact, not making an income. 生命在于影响他人,而非赚钱糊口. From Kevin Kruse. You probabl ...
- 【C编程基础】make命令和makefile文件
1.关于程序的编译和链接 一般来说,无论是C.C++首先要把源文件编译成中间目标文件即 Object File(windows为.obj文件,unix为.o文件),这个动作叫做编译(compile). ...
- 创建ssh 服务的镜像
$ sudo docker run -ti ubuntu:14.04 /bin/bash #首先,使用我们最熟悉的 「-ti」参数来创建一个容器. root@fc1936ea8ceb:/# sshd ...
- P1279 字串距离 dp 洛谷
题目描述 设有字符串X,我们称在X的头尾及中间插入任意多个空格后构成的新字符串为X的扩展串,如字符串X为”abcbcd”,则字符串“abcb□cd”,“□a□bcbcd□”和“abcb□cd□”都是X ...