启动ipython
时会出现标题错误-尽管实际上ipython
确实出现了:
$ipython
Python 3.7.3 (default, Apr 22 2019, 11:31:47)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help.
[TerminalIPythonApp] WARNING | Unknown error in handling startup files:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/usr/local/Cellar/ipython/7.4.0/libexec/lib/python3.7/site-packages/IPython/core/shellapp.py in _exec_file(self, fname, shell_futures)
338 self.shell.user_ns,
339 shell_futures=shell_futures,
--> 340 raise_exceptions=True)
341 finally:
342 sys.argv = save_argv
/usr/local/Cellar/ipython/7.4.0/libexec/lib/python3.7/site-packages/IPython/core/interactiveshell.py in safe_execfile(self, fname, exit_ignore, raise_exceptions, shell_futures, *where)
2710 py3compat.execfile(
2711 fname, glob, loc,
-> 2712 self.compile if shell_futures else None)
2713 except SystemExit as status:
2714 # If the call was made with 0 or None exit status (sys.exit(0)
/usr/local/Cellar/ipython/7.4.0/libexec/lib/python3.7/site-packages/IPython/utils/py3compat.py in execfile(fname, glob, loc, compiler)
186 with open(fname, 'rb') as f:
187 compiler = compiler or compile
--> 188 exec(compiler(f.read(), fname, 'exec'), glob, loc)
189
190 # Refactor print statements in doctests.
~/.ipython/profile_default/startup/disableSmartEnter.py in <module>
16
17 # Register the shortcut if IPython is using prompt_toolkit
---> 18 if getattr(ip, 'pt_cli'):
19 registry = ip.pt_cli.application.key_bindings_registry
20 registry.add_binding(Keys.Enter,
AttributeError: 'TerminalInteractiveShell' object has no attribute 'pt_cli'
在全新安装的python 3.7.3之前,我已经完成了brew install
中的ipython
的新操作
brew upgrade python3
brew install ipython
brew link --overwrite ipython