python3的默认版本

ubuntu14.04系统,输入python3.4,会出现提示(以下简称python3.4版本的提示)
Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.

以前输入python3,也是有python3.4的版本提示;但是,安装了 Anaconda 之后,输入python3,就变成了Python3.6的提示了
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

在/usr/bin/目录下的python链接是这样的
图片描述

从两个方面进行查看
1.~/.bashrc里面
此文件中仅仅只是多了一个

# added by Anaconda3 4.4.0 installer
export PATH="/home/yangxiaohuan/anaconda3/bin:$PATH"

将此export注释掉之后,source ~/.bashrc,依然是输入python3,出来python3.6版本

2.系统级Python 版本
root用户下
update-alternatives --list python
结果是提示:
update-alternatives: error: no alternatives for python
那么证明系统级上是没有python的

不知道如何变换成原来的:输入python3,出来是python3.4的提示,求助

阅读 3.7k
2 个回答

PATH环境变量的影响而已,你把conda给你加的export PATH="/home/yangxiaohuan/anaconda3/bin:$PATH"这一行删掉或者注释掉,重开一个终端就OK了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题