卸载然后重新安装所有IPython:
卸载:brew uninstall ipython ## had a version installed w/ brew on my machine
pip2 uninstall ipython
pip3 uninstall ipython
用PIP 2和PIP 3重新安装:pip2 install ipython
pip3 install ipython
现在我知道ipython2使用版本2.7而ipython使用版本3.6:
mustache:~ r8t$ ipython
Python 3.6.5 (default, Apr 25 2018, 14:26:36)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: exit()
mustache:~ r8t$ ipython2
Python 2.7.15 (default, May 1 2018, 16:44:37)
Type "copyright", "credits" or "license" for more information.
IPython 5.7.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.