Python版本问题

时间:2015-10-27 06:17:43

标签: python macos osx-elcapitan

我是Python的新手。但我从我的MAC(OS X El Capitan)上从python.org下载的pkg文件安装Python 3.5.0

问题是当我去终端并发出命令

python -V

它向我显示 Python 2.7.10 为什么会这样,我该如何删除该版本

1 个答案:

答案 0 :(得分:4)

每个Linux(其中大多数实际上)都捆绑了python 2.7.x.这就是为什么它向你展示版本2.7.10。

尝试在终端中运行:

python3

你会得到类似的东西:

Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

其中3.4.3是python版本。

同样适用于python2。