我找到了一个解决方案,在您的IPython配置文件目录(默认为-
.ipythonprofile_default)中,使用以下几行来编辑文件
ipython_config.py(
ipython profilecreate如果不存在,请创建文件):
# loads the root config objectc=get_config()# executes the line in brackets on program launchc.InteractiveShellApp.exec_lines = ['from __future__ import division']



