Python学习笔记-编译安装Python3.6.1 + iPython

简介:

由于系统已有2.6的python,最好不好修改系统的版本,使用编译安装

下载Python3.6.1包

?
1
wget https: //www .python.org /ftp/python/3 .6.1 /Python-3 .6.1. tar .xz

安装依赖:

?
1
yum -y  install  readline-devel

解压Python-3.6.1.tar.xz

?
1
xz -d Python-3.6.1. tar .xztar -xvf Python-3.6.1. tar

编译安装,指定/usr/local/python361目录

?
1
cd  Python-3.6.1. /configure  --prefix= /usr/local/python361make  &&  make  install

创建软链接

?
1
[root@kurol bin] # ln -s /usr/local/python361/bin/python3.6 /usr/bin/python36

 

安装ipython,使用国内豆瓣源,速度快。

?
1
python36 -m easy_install -i http: //pypi .douban.com /simple/  ipython

 

测试ipython

1
2
3
4
5
6
7
[root@kurol ~] # ipython
/ usr / local / python361 / lib / python3. 6 / site - packages / ipython - 6.1 . 0 - py3. 6.egg / IPython / core / history.py: 226 : UserWarning: IPython History requires SQLite, your history will  not  be saved
  warn( "IPython History requires SQLite, your history will not be saved" )
Python  3.6 . 1  (default, Jun  1  2017 11 : 21 : 44
Type  'copyright' 'credits'  or  'license'  for  more information
IPython  6.1 . 0  - -  An enhanced Interactive Python.  Type  '?'  for  help .
In [ 1 ]:




 


      本文转自谢育政 51CTO博客,原文链接:http://blog.51cto.com/kurolz/1935018,如需转载请自行联系原作者


相关文章
|
23天前
|
存储 C语言 Python
【Python】学习笔记day3
【Python】学习笔记day3
27 1
|
4月前
|
SQL 分布式计算 大数据
Python+大数据学习笔记(一)
Python+大数据学习笔记(一)
43 0
|
6天前
|
Python
基于Django的Python应用—学习笔记—功能完善
基于Django的Python应用—学习笔记—功能完善
|
23天前
|
存储 C语言 芯片
【Python】学习笔记day1
【Python】学习笔记day1
33 1
|
30天前
|
算法 搜索推荐 测试技术
python排序算法及优化学习笔记1
python实现的简单的排序算法,以及算法优化,学习笔记1
33 1
|
1月前
|
Java 编译器 Shell
【Python 基础教程 04】超详细Python编程教程:初学者入门至全面了解Python 解析器( CPython、IPython、Jython和PyPy)
【Python 基础教程 04】超详细Python编程教程:初学者入门至全面了解Python 解析器( CPython、IPython、Jython和PyPy)
44 0
|
6月前
|
jenkins 持续交付 开发工具
Python学习笔记_Devops_Day05
Python学习笔记_Devops_Day05
|
6月前
|
持续交付 开发工具 数据安全/隐私保护
Python学习笔记_Devops_Day04
Python学习笔记_Devops_Day04
|
6月前
|
JSON JavaScript 前端开发
Python学习笔记_Devops_Day02
Python学习笔记_Devops_Day02
|
6月前
|
SQL 关系型数据库 数据库
Python学习笔记_Day09
Python学习笔记_Day09