[root@squid ~]# sed -i 's#keepcache=0#keepcache=1#g' /etc/yum.conf
[root@squid ~]# grep keepcache /etc/yum.conf 
keepcache=1
[root@squid ~]# ls /var/cache/yum/x86_64/6/base/packages/
yum groupinstall "Development tools"
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel

tar -Jxvf Python-3.4.3.tar.xz
mkdir /usr/local/python3
cd Python-3.4.3/
./configure --prefix=/usr/local/python3
make
make install
cd /usr/bin/
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

[root@squid ~]# python -V
Python 2.6.6
[root@squid ~]# python3 -V
Python 3.4.3
[root@squid ~]# pip3
[root@squid ~]# python3
Python 3.4.3 (default, Jun 17 2016, 13:34:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

vim /usr/bin/yum
#!/usr/bin/python2.7
vim /usr/libexec/urlgrabber-ext-down
#! /usr/bin/python2.7


mv python python2.6
mv python python2.7

1. 准备
安装模块
# yum groupinstall "Development tools"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
Python3.4 安装
下载代码 configure → make → make altinstall
# cd /usr/local/src
# wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
# tar -zxvf Python-3.4.3.tgz
# cd Python-3.4.3
# ./configure --prefix=/usr/local/python
# make && make altinstall
安装Python3.4 :公用库的安装
# echo "/usr/local/python/lib" >> /etc/ld.so.conf
# ldconfig
安装Python3.4: 4. /usr/local/bin/
# ln -s /usr/local/python/bin/python3.4 /usr/local/bin/python
安装Python3.4 :5. 确认是否安装正确
# /usr/local/python/bin/python3.4 -V
# python -V
安装Python3.4 Easy_Install
# cd /usr/local/src
# wget https://pypi.python.org/…/s/setuptools/setuptools-18.0.1.zip
# unzip setuptools-18.0.1.zip
# cd setuptools-18.0.1
# /usr/local/bin/python setup.py install
# ln -s /usr/local/python/bin/easy_install /usr/local/bin/easy_install
安装Python3.4 :Pip
# /usr/local/bin/easy_install pip
# ln -s /usr/local/python/bin/pip /usr/local/bin/pip
安装Python3.4: Virtualenv
# pip install virtualenv
# ln -s /usr/local/python/bin/virtualenv /usr/local/bin/virtualenv
安装Python3.4 :Virtualenvwrapper
# pip install virtualenvwrapper
安装Python3.4 :参数设定
$ vim ~/.bashrc
if [ -f /usr/local/python/bin/virtualenvwrapper.sh ]; then
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/python/bin/virtualenvwrapper.sh
fi

Centos 6.x 安装Python 3.4.3的更多相关文章

  1. Linux CentOS 编绎安装Python 3.5

    Linux CentOS 编绎安装Python 3.5 先决条件(若无安装,则不能编绎使用idle3):yum install tk-devel xz -d Python-3.5.0.tar.xzta ...

  2. CentOS 6 下安装Python 3

    可以下载各个版本的python:https://www.python.org/ftp/python/ 配置安装 下载最新的安装包(截止2013/11/05),还是3.3.2版本. #wget http ...

  3. 如何在 CentOS 7 上安装 Python 3

    当前最新的 CentOS 7.5 默认安装的是 Python 2.7.5,并且默认的官方 yum 源中不提供 Python 3 的安装包.这里主要介绍两种在 CentOS 7 中安装 Python 3 ...

  4. c#实例化继承类,必须对被继承类的程序集做引用 .net core Redis分布式缓存客户端实现逻辑分析及示例demo 数据库笔记之索引和事务 centos 7下安装python 3.6笔记 你大波哥~ C#开源框架(转载) JSON C# Class Generator ---由json字符串生成C#实体类的工具

    c#实例化继承类,必须对被继承类的程序集做引用   0x00 问题 类型“Model.NewModel”在未被引用的程序集中定义.必须添加对程序集“Model, Version=1.0.0.0, Cu ...

  5. centos 7下安装python 3.6笔记

    每次在centos上安装python 3都需要重新查资料,这次索性自己记下笔记. 首先安装gcc yum -y install gccyum install zlib-devel./configure ...

  6. CentOS下编译安装python包管理安装工具pip教程

    ubuntu 安装pip 代码如下: apt-get install python-pip 安装requests, pip install requests 对于centos的,直接 yum inst ...

  7. CENTOS 7 升级安装 Python 3.5

    写在前面的话 本文采取源码的方式安装 Python 3.5.2,如果是其它版本会有或多或少的差异,且写这篇的时候官网最新的是 Python 3.7,个人使用 3.5 就足够了,没必要更新到最新,否则出 ...

  8. CentOS 6.5 安装Python 3.5

    1.CentOS6.5 安装Python 的依赖包 yum groupinstall "Development tools" yum install zlib-devel bzip ...

  9. centos 源码安装python

    一.准备环境 首先在官网下载想要的python对应版本http//www.python.org/downloads/source 下载tgz就可以了.文件有两种 1,Python-版本号.tgz(解压 ...

  10. 在centos上面编译安装python

    前言 因为在学习storm的过程中需要安装python,storm是部署在linux上面的,所以需要将python安装在linux上面. 安装准备 python下载 官网链接:https://www. ...

随机推荐

  1. NSArray 排序

    先研究一种方法 NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:]; ; i < ; i++) { ; [arr ...

  2. (转)Duplicate Symbol链接错的原因总结和解决方法

    duplicate symbol是一种常见的链接错误,不像编译错误那样可以直接定位到问题的所在.但是经过一段时间的总结,发现这种错误总是有一些规律可以找的.例如,我们有如下的最简单的两个类代码: // ...

  3. Codeforces Round #877 (Div. 2) D. Olya and Energy Drinks

    题目链接:http://codeforces.com/contest/877/problem/D D. Olya and Energy Drinks time limit per test2 seco ...

  4. eclipse代码格式化快捷键无法使用

    [产生原因] Ctrl+Shift+F快捷键组合被其他应用占有,如输入法. [解决方案] 关闭或更换其他应用快捷键或更换eclipse对应的快捷键组合.

  5. python基础学习笔记——闭包

    闭包这个概念好难理解,身边朋友们好多都稀里糊涂的,稀里糊涂的林老冷希望写下这篇文章能够对稀里糊涂的伙伴们有一些帮助~ 请大家跟我理解一下,如果在一个函数的内部定义了另一个函数,外部的我们叫他外函数,内 ...

  6. CMDB资源配置管理项目

    浅谈ITIL TIL即IT基础架构库(Information Technology Infrastructure Library, ITIL,信息技术基础架构库)由英国政府部门CCTA(Central ...

  7. 图论trainning-part-2 C. The Largest Clique

    C. The Largest Clique Time Limit: 3000ms Memory Limit: 131072KB 64-bit integer IO format: %lld      ...

  8. zoj 2830 Champion of the Swordsmanship

    Champion of the Swordsmanship Time Limit: 2 Seconds      Memory Limit: 65536 KB In Zhejiang Universi ...

  9. 雅图CAD

    今天培训了雅图CAD. 由辅助线确定下一步的位置,是个好思想.

  10. Selenium WebDriver高级用法

    Selenium GitHub地址 选择合适的WebDrvier WebDriver是一个接口,它有几种实现,分别是HtmlUnitDrvier.FirefoxDriver.InternetExplo ...