1.安装python 3.4程序
sudo apt-get install python3.4
2.python 3.4是被默认安装在/usr/local/lib/python3.4,删除默认pythonlink文件/usr/bin/python,重新建立连接关系
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.4 /usr/bin/python
3.确认python 版本
python 
输入quit()退出,如果显示是python3.4版本,就说明成功
4.恢复python低版本
sudo apt-get install --reinstall python-minimal
5.在home文件夹下新建一个uu.py文件,把print ('Hello World!')给复制进去。
6.测试
python3 uu.py
如果这个运行成功,就说明可以了。
也有说法是ubuntu自带有python3版本和2版本,但这里好像做的是使默认版本为3.4

Ubuntu下安装Python3.4及用python编译py文件的更多相关文章

  1. Ubuntu下安装Python3.4

    转自:http://blog.sina.com.cn/s/blog_7cdaf8b60102vf2b.html 1. 通过命令行安装Python3.4,执行命令:sudo apt-get instal ...

  2. ubuntu下安装Python3

    到www.python.org网站下载python3.3.2 Gzipped source tar ball (3.3.2) (sig), ~ 16 MB 解压tar vxzf Python3.3.2 ...

  3. Ubuntu下安装Python3.6并在终端输入Python就能显示Python3.6

      Ubuntu17.04自带Python2.7与Python3.5.3的版本,由于Python2与Python3有着一些差距可能需要安装更新Python3的版本,并且切换默认的Python解释器. ...

  4. ubuntu下安装python3.6.5导入ssl模块失败

    1.问题 python安装完毕后,提示找不到ssl模块: [root@localhost ~]# python3 Python ( , ::) [GCC (Red Hat -)] on linux2 ...

  5. Ubuntu下安装Python3(与旧Python2版本共存)

    官网下载Python3的源码 进行配置,在源码目录运行如下命令. ./configure --prefix=/usr/local/python3 --enable-shared 进行编译,在源码目录运 ...

  6. ubuntu下安装python3及常用爬虫库命令

    爬虫常用库安装:

  7. python3.6和pip3:Ubuntu下安装升级与踩坑之路

    本文以Ubuntu16.x系统为例,演示如何安装python3.6和相应环境.安装Python3的机器必须要能访问外网才能进行如下操作! 1. 安装方式 在Ubuntu下安装python有两种方式: ...

  8. Ubuntu下安装python相关数据处理

    01. Ubuntu下安装ipython sudo apt-get install ipython 02. Ubuntu下安装pip $ sudo apt-get install python-pip ...

  9. 在 ubuntu 中安装 python3.5、 tornado、 pymysql

    一.在 ubuntu 中安装 python3.5 1.首先,在系统中是自带python2.7的.不要卸载,因为一些系统的东西是需要这个的.python2.7和python3.5是可以共存的. 命令如下 ...

随机推荐

  1. 牛客网 牛客小白月赛1 C.分元宵-快速幂

    C.分元宵   链接:https://www.nowcoder.com/acm/contest/85/C来源:牛客网 这个题就是快速幂,注意特判,一开始忘了特判,wa了一发. 代码: 1 #inclu ...

  2. Codeforces 622F The Sum of the k-th Powers(数论)

    题目链接 The Sum of the k-th Powers 其实我也不懂为什么这么做的……看了无数题解觉得好厉害哇…… #include <bits/stdc++.h> using n ...

  3. Codeforces 798D Mike and distribution(贪心或随机化)

    题目链接 Mike and distribution 题目意思很简单,给出$a_{i}$和$b_{i}$,我们需要在这$n$个数中挑选最多$n/2+1$个,使得挑选出来的 $p_{1}$,$p_{2} ...

  4. Centos7源码安装MySQL5.7

    a.连接数据库报111 从一台linux远程连接另一台linux上的MySQL,出现ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx. ...

  5. Nginx+keepalived双机热备(主主模式)

    IP说明: master机器(master-node):10.0.0.5/172.16.1.5   VIP1:10.0.0.3slave机器(slave-node): 10.0.0.6/172.16. ...

  6. Java过滤HTML标签工具类

    过滤HTML标签能有效的放置XSS攻击. 封装: import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springf ...

  7. Could not change executable permissions on the application

    I could solve it erasing an application that I had previously uploaded using the same Bundle Identif ...

  8. 邁向IT專家成功之路的三十則鐵律 鐵律十二:IT人養生之道-德行

    所謂的「養生」在中國古代裡所指的是針對內在精神層面修為的提升,到了近代中醫所謂的養生,則除了包含最根本的內在精神層面之外,還涵蓋了外在身體的養護.在現今各行各業的人士當中,嚴格來說都應該要有一套專屬的 ...

  9. Path SumI、II——给出一个数,从根到子的和等于它

    I.Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up a ...

  10. [学习笔记]Java异常机制

    概述 异常 程序在执行时出现的不正常情况,是对问题的描写叙述.将问题进行对象的封装. Java中的异常,就是对不正常情况进行描写叙述后的对象体现. 异常体系 Throwable     |--Erro ...