python - Configuration of Ipython -
i'm new python , ipython. i'm following data analysis pandas on youtube. the link
i installed anaconda , started use ipython on windows 8.1
for several commands, seems ok
in [2]: print 5 5
but when tried followe tutorial online seems ipyhon has got problems,
in [3]: %pylib inline error: line magic function `%pylib` not found.
also, copies code tutorials, simple codes this
in [4]:plot(arange(10)) nameerror traceback (most recent call last) <ipython-input-6-353c92d67d6b> in <module>() ----> 1 plot(arange(10)) nameerror: name 'plot' not defined
after "imported matplotlib", still didn't work.
also, code a = arange(10)
didn't work. have use this:
import numpy np = np.arange(10)
but tutor in video didn't use this.
i think should associated configuration anaconda or ipython?
but i'm not sure , don't know how figure out. i'm using latest version of anaconda on windows 64bit.
any suggestions? thanks!
- use
%pylab inline
or%pylab
enable pylab mode. alter event loop either show plots inline (notebook) or display them in different window without interfering code execution (cli).- executing
%pylab
set ipython handle matplotlib nicely, , commitfrom pylab import *
put numpy , matplotlib commands inside default namespace. - equivalent way that, when invoke ipython, use `ipython --pylab [notebook|qtconsole|etc..]. in windows, can either console or alter shortcut add command line arguments.
- you can change ipython system wide configuration load pylab, see http://ipython.org/ipython-doc/stable/config/overview.html#flags
- executing
see answer more information: https://stackoverflow.com/a/21457629/3245308
Comments
Post a Comment