我是python /编码的新手,最近才开始使用ipython shell。但是,它自动默认为python 2.7版本,我想将其切换为3.6。如果有人能指出我正确的方向,我将不胜感激。我正在使用MacBook Air。以下是启动python shell时的外观。我已经安装了两个Python版本。
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 13:10:39)
Type "copyright", "credits" or "license" for more information.
IPython 5.8.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.
最佳答案
用pip3而不是pip安装ipython。可能需要先卸载现有版本的ipython。