RuntimeError: Python is not installed as a framework 错误解决办法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RuntimeError: Python is not installed as a framework 错误解决办法相关的知识,希望对你有一定的参考价值。
因为我是macbook,mac是自带的python 2.7,但是我开发需要使用到的是python3,所以先使用pip3 install matplotlib
然后在交互页面键入import matplotlib的时候,会报RuntimeError的错误
这个时候在“~”路径下面,使用命令ls -a会列出所有的文件,包括隐藏文件,会发现有一个.matplotlib的隐藏文件
然后在~/.matplotlib该目录下面新建一个名为matplotlibrc的文件,在该文件里面里面编辑内容backend: TkAgg,保存退出即可
以上是关于RuntimeError: Python is not installed as a framework 错误解决办法的主要内容,如果未能解决你的问题,请参考以下文章
RuntimeError: Python is not installed as a framework 错误解决方案
[未解决问题记录]python asyncio+aiohttp出现Exception ignored:RuntimeError('Event loop is closed')(代码片段
Python 成功解决报错 asyncio RuntimeError: This event loop is already running
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to funct
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9 / ImportError