美图秀秀超能力测试,中考网天津,相机排行榜
from matplotlib import某函数Error--RuntimeError: Python is not installed as a framework问题解决
在mac上装一个tensorflow做一些小的实验还是蛮方便的。用virtualenv的方式避免了很多麻烦。
sudo pip install --upgrade virtualenv
virtualenv --system-site-packages tensorflow
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.7.1-py2-none-any.whl
但是在运行的时候发现报错:
from matplotlib.backends import _macosx
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. If you are Working with Matplotlib in a virtual enviroment see ‘Working with Matplotlib in Virtual environments’ in the Matplotlib FAQ
解决的方法也很简单:
vim ~/.matplotlib/matplotlibrc
然后输入以下内容:
backend: TkAgg
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
新手学习Python2和Python3中print不同的用法
Python基于os.environ从windows获取环境变量
网友评论