Download the package.  Then...

tar -xvzf Python-3.7.0.tgz

  进入目录:

cd Python-3.7.0/

  添加配置:

./configure --prefix=/usr/python

  这里配置自己的安装目录,接下来编译源码:

make

  执行安装:

make install

  整个过程大约5-10分钟,安装成功之后,安装目录就在/usr/python

  系统中原来的python在/usr/bin/python,通过ls -l可以看到,python是一个软链接,链接到本目录下的python2.6

  我们可以把这个删除,也可以新建一个python3的软链接,只不过执行时python要改成python3,或者python脚本头部声明要改为#!/usr/bin/python3

  这里为了方便建议先重命名一下,然后建立个软链接就可以了,之前的程序头部也不用更改:

$ mv /usr/bin/python /usr/bin/python.bak
$ ln -s /usr/python/bin/python3 /usr/bin/python

  这样就建立好了,以后直接执行python命令,就相当于调用python3,实际上python3也是个软链接,链接到python3.7.0,这个多次链接其实不影响,主要是为了版本升级更加方便,不用改版本号了

  python3新版本的安装就是这些,不用卸载旧版本,新版本同样正常使用

Debian install Python3.7的更多相关文章

  1. Centos 6.9 install Python3.7

    # install python3sudo yum -y updatesudo yum -y install yum-utils yum install -y zlib-devel bzip2-dev ...

  2. macOS how to install python3

    macOS how to install python3 macOS & Python 3.7.2 https://www.python.org/downloads/mac-osx/ http ...

  3. anaconda2下面安装opencv2.4.13.4完成----解决默认安装的问题----Thefunction is not implemented. Rebuild the library with Windows, GTK+ 2.x orCarbon support. If you are on Ubuntu or Debian, install libgtk2.0‑dev and pkg

    转载自:http://blog.csdn.net/qingyanyichen/article/details/73550924 本人下载编译安装了opencv2.4.9,oppencv2.4.10,o ...

  4. debian install & configure(2)-drivers-nvidia

    ==========================================手动编译卸载受限驱动 :apt-get --purge remove nvidia-*apt-get --purge ...

  5. Centos install Python3

    下载Python3wget http://python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz 安装yum install openssl-devel bzi ...

  6. centos install python3 pip3

    yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-dev ...

  7. centos7 install python3.7 with problem and how to fix it.

    问题如下: configure: error: no acceptable C compiler found in $PATH 缺少gcc zipimport.ZipImportError: can’ ...

  8. centos7 install python3

    1. 过程 # 1. root权限, 安装依赖 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-dev ...

  9. Install python3

    wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz tar xf Python-3.7.4.tgz cd Python-3.7. ...

随机推荐

  1. Linux下PHP扩展pdo_mysql

    1.进入PHP源码包ext/pdo目录 cd ext/pdo 2.执行/usr/local/php/bin/phpize[假设PHP的安装目录为/usr/local/php] /usr/local/p ...

  2. django——文本编辑器

    在博客项目中,为了支持用户的在线编辑博客,我们选用了kindeditor这个强大的编辑器. 以下是对kindeditor的简介,以及在Django中引入这个编辑器的方法:) 1.KindEditor是 ...

  3. ZOJ Monthly, March 2018

    A. Easy Number Game 贪心将第$i$小的和第$2m-i+1$小的配对即可. #include<cstdio> #include<algorithm> usin ...

  4. Nested Dolls 贪心 + dp

    G: Nested Dolls Time Limit: 1 Sec     Memory Limit: 128 Mb     Submitted: 99     Solved: 19 Descript ...

  5. 移除K位数字

    1.题目来源:选自LeetCode 402: 2.问题描述: 3.问题分析 通过分析我们可以得出这样的结论:如果后一个数字比前面的数字小的话,那么我们就要把前面的一个数字删除掉,并且每次把字符串中拆出 ...

  6. Go语言基础之time包

    Go语言基础之time包 时间和日期是我们编程中经常会用到的,本文主要介绍了Go语言内置的time包的基本用法. Go语言中导入包 Go语言中使用import关键字导入包,包的名字使用双引号(”)包裹 ...

  7. [LeetCode] Binary Tree Pruning 二叉树修剪

    We are given the head node root of a binary tree, where additionally every node's value is either a ...

  8. [LeetCode] Serialize and Deserialize N-ary Tree N叉搜索树的序列化和去序列化

    Serialization is the process of converting a data structure or object into a sequence of bits so tha ...

  9. Design Principle, Design Patterns And Refactoring

    https://refactoring.guru/smells/feature-envy https://stackoverflow.com/questions/1242994/effective-c ...

  10. c语言,以单词为单位逆序字符串

    #include "string.h" #include "stdio.h" char * nixu(char *c) { ; int n = strlen(c ...