Ubuntu python多个版本管理
1.查看python有哪些版本使用命令
whereis python
如图:
2.这么多版本如何切换呢
使用 sudo update-alternatives --install <link> <name> <path> <priority>
link:指向/etc/alternatives/<name>的符号引用
name:这个链接组的名称
path:这个命令对应的可执行文件的实际路径
priority:优先级,在auto模式下,数字较大的选项有较高的优先级
例如
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
添加完后
update-alternatives --list python 查看结果

切换两个版本
update-alternatives --config python 会提示出两个版本,然后按照提示选择即可

Ubuntu python多个版本管理的更多相关文章
- MacOS下Python的多版本管理(pyenv)
与windows下设置绝对路径不同,pyenv使用了一种更优雅的方式来管理Python的版本.pyenv通过在$PATH的最前面插入一个垫片路径(shims),例如:~/.pyenv/shims:/u ...
- 基于Ubuntu+Python+Tensorflow+Jupyter notebook搭建深度学习环境
基于Ubuntu+Python+Tensorflow+Jupyter notebook搭建深度学习环境 前言一.环境准备环境介绍软件下载VMware下安装UbuntuUbuntu下Anaconda的安 ...
- ubuntu python 版本管理
ubuntu 命令行查看 python 目录 $ whereis python # 显示所有得到 python 目录 $ which python # 显示默认的 python 解释器目录 $ wh ...
- ubuntu python的升级与回滚
转自:https://www.cnblogs.com/wmr95/p/7637077.html 正常情况下,你安装好ubuntu16.04版本之后,系统会自带 python2.7版本,如果需要下载新版 ...
- ubuntu python apache2 wsgi django框架
在ubuntu上通过apatch2和wsgi部署django (亲手做过!!!) 一,我的python.django.apatch2版本: python:python -V 2.7.3 django: ...
- Ubuntu python Compression requires the (missing) zlib module
描述: 在Ubuntu中安装setuptools时出现 Compression requires the (missing) zlib module 解决方法步骤: ①Ubuntu下安装zlib: ...
- pgAdmin4 ubuntu python 安装
ubuntu安装pgAdmin4,通过python的pip 安装 pgAdmin4.(首更时间20161205) 新版本的pgAdmin4目前支持mac/window/linux/python,可是l ...
- rrdtool ubuntu python snmpwalk
rrdtool install: apt-get install libpango1.0-dev libxml2-dev wget https://packages.debian.org/wheezy ...
- ubuntu python及python IDLE 的安装
ubuntu下Python的安装和使用 文章参考出处:https://www.cnblogs.com/luckyalan/p/6703590.html ubuntu14.04 安装Python2.7: ...
随机推荐
- Inception Score
转载 https://www.jiqizhixin.com/articles/2019-01-10-18 全面解析Inception Score原理及其局限性 https://blog.csdn ...
- 详解BurpSuite软件 请求包 HTTP (9.23 第十天)
HTTP协议基础 HTTP:HyperText Transfer Protocol,超文本传输协议 1.协议特点: 简单快速,请求方式get post head等8中请求方式 无连接(一次请求就断开) ...
- ORACLE 将一个库的部分值带条件插入到另外一个库
将一个表插入另外一个表,两种方法: 1.insert into table1 select * from table2 ; 或者2.create table1 as select * from tab ...
- node —— 静态资源文件管理
var http = require("http"); var url = require("url"); var fs = require("fs& ...
- 覆盖.project
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name ...
- Pycharm2020最新激活码|永久激活(附最新激活码和插件)
最近很多人的Pycharm激活时间又过期了,后台很多人索要激活码,我就再把激活的方法汇和工具再梳理一次给大家. 最主要有两种激活方式(两种方式需要的激活码不同): 一.激活码激活: 一般一年多需要激活 ...
- POJ 3126:Prime Path
Prime Path Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Submit St ...
- C++ CreateInstance("ADODB.Connection");创建接口失败的解决方法
数据库对象mssql2005sp3专业版: 一般数据引用该路径文件#import "c:\\program files\\common files\\system\\ado\\msado15 ...
- group_concat用法以及字符串太长显示不全
由于group_concat默认的长度是1024,所以要将最大长度修改 首先执行 SET SESSION group_concat_max_len = 10240;#一次查询有效 然后再进行拼接 se ...
- 在linux上部署多个tomcat
1.vim /etc/profile ##########first tomcat########### CATALINA_BASE=/usr/apache-tomcat--fore CATALIN ...