【发布时间】:2016-01-25 06:58:09
【问题描述】:
我的系统默认安装了 Python 2.7.9:-
amitwebhero@AmitKali:~$ python
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
我已经安装了它的最新版本 Python 3.5。
amitwebhero@AmitKali:~$ python3.5
Python 3.5.0+ (default, Oct 11 2015, 09:05:38)
[GCC 5.2.1 20151003] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
但是每当我想在终端中编译一个python程序时,我需要写python3.5 file_name.py,所以我想改变我的默认python版本。
但是我已经安装了基于 python 2.7.9 的插件和程序,所以我怀疑如果我将我的 python 3.5 设置为默认值,那么它可能会导致我使用以前版本的 python 安装的所有插件出现问题。
如果可能,请尝试告诉我是否应该更改我的默认 python?
【问题讨论】:
-
在我们回答您的问题之前:您知道这两个版本之间的区别吗?
-
@KevinGuan 是的...我知道
-
所以如果你真的想这样做,那么如果他们写像
.../python这样的shebang,可能很多程序都无法运行。
标签: python python-2.7 terminal python-3.5