首先找到你的.ipython文件夾下的\profile_default文件夾侈贷,打開,按住shift并點(diǎn)擊鼠標(biāo)右鍵等脂,在此處打開命令行俏蛮,然后輸入:
ipython profile create
此時(shí)該文件夾下多出兩個(gè)配置文件
ipython_config.py:打開任意ipython kernel時(shí)都會運(yùn)行
ipython_notebook_config.py:打開notebook時(shí)會運(yùn)行
打開ipython_config.py撑蚌,在任意位置添加下面幾句:
c = get_config()
# Run all nodes interactively
c.InteractiveShell.ast_node_interactivity = "all"
重啟jupyter可以使用了