使用

来源:互联网 发布:国家人社局软件 编辑:程序博客网 时间:2024/04/29 09:43
使用ipython执行%matplotlib inline提示No event loop integration for u'inline'. Supported event loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx

,这个是ipython不支持图形化,所以可以使用ipython notebook,即jupyter

因为jupyter最新版需要python3, 所以可以适用Anaconda包管理器安装python3

conda create -n env_name python=3.5

安装好后安装相应的pip3


命令行: ipython notebook即可打开jupyter,这是一个网页,在file栏的右侧有个new选项,选择python3即可打开一个命令行


import numpy as npimport matplotlib as mplimport matplotlib.pyplot as plt%matplotlib inlinenp.random.seed(1000)y = np.random.standard_normal(20)x = range(len(y))plt.plot(x, y)