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也提供了许多第三方的库,我们可以自己下载使用. ...
随机推荐
- WebRTC 简介及服务搭建、测试
WebRTC主要解决如下三个问题 1.获取音频和视频. 可以访问输入设备,如话筒.(网络)摄像机(头),可以从上述设备获取媒体数据流.目前需要硬件设备支持VP8/VP9,如果设备仅仅支持H.264/H ...
- java传输文件的简单方法
假设现在已经打包了一个文件(1233444333),要将这个文件传输给另一方: package file; import java.io.*; public class F_PasswordUnPas ...
- zabbix监控tomcat(使用jmx监控,但不使用系统自带模版)
一,zabbx使用jmx监控tomcat的原理分析 1.Zabbix-Server找Zabbix-Java-Gateway获取Java数据 2.Zabbix-Java-Gateway找Java程序(j ...
- Oracle EBS compile PLD PLL files.
PLL->PLX:frmcmp_batch module_type=library userid=apps/apps module=$1.pll output_file=$1.plx compi ...
- 探索SQL Server元数据(二)
背景 上一篇中,我介绍了SQL Server 允许访问数据库的元数据,为什么有元数据,如何使用元数据.这一篇中我会介绍如何进一步找到各种有价值的信息.以触发器为例,因为它们往往一起很多问题. 那么如何 ...
- SqlServer2017下载地址
https://www.microsoft.com/zh-CN/download/details.aspx?id=55994
- c/c++ 线性表之双向链表
c/c++ 线性表之双向链表 线性表之双向链表 不是存放在连续的内存空间,链表中的每个节点的next都指向下一个节点,每个节点的before都指向前一个节点,最后一个节点的下一个节点是NULL. 真实 ...
- [Hive_add_11] Hive 使用 UDTF 实现日志降维
0. 说明 对日志进行降维处理,将日志分为几个小表 通过编写 UDTF ,对日志降维,将日志聚合体相关字段抽取出来,形成新表. 1. 操作流程 1.0 日志部分内容 ##{\"appChan ...
- 排序算法之直接插入排序的思想以及Java实现
1,基本思想 假设待排序的数据是数组A[1-.n].初始时,A[1]自成1个有序区,无序区为A[2-.n].在排序的过程中,依次将A[i] (i=2,3,-.,n)从后往前插入到前面已排好序的子数组A ...
- Angular中ui-router实现路由嵌套案例
学习 ui-router 资料整理 对于Angular内置的路由是单路由视图,ui-router可以实现路由嵌套.后面将会有一个案例概括前面所有资料整理 学习 ui-router - 管理状态 ht ...