python - 如何将 ipython shell 从 2.7 版切换到 3.6 版
问题描述
我是 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 安装 ipython,而不是 pip。可能需要先卸载现有版本的 ipython。
推荐阅读
- google-bigquery - 更新两次嵌套重复记录
- android - 如何限制 Framelayout 在屏幕上占用的空间量?
- python - 当我使用常规运行时间(分钟)时,我的错误是 25,但是当我记录运行时日志(使其正常)时,我的错误是 0.3?
- c# - 我的 C# 控制器中的参数从 AJAX 调用读取为 null
- sql - 如何在选择查询中不显示项目?
- powerbi - 如何在 PowerBI 中创建一个 x 轴和两个平行 y 轴的条形图
- ios - 使用 sharedApplication openURL 方法在 Safari 中使用 POST 方法打开 URL
- reactjs - 开玩笑遇到了一个意外的令牌-看起来无法转换 jsx 元素
- c++ - 如何使用面板在穿山甲中显示 2D 图形
- azure-cosmosdb - Azure cosmosDB 不会删除 TTL 过期的文档