Centos6.5安装python2.7与pip
安装Python2.7
安装环境
[root@localhost1 ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@localhost1 ~]# uname -a
Linux localhost1 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
安装依赖包
[root@localhost1 ~]# yum -y install gcc openssl-devel bzip2-devel
下载python源码包
[root@localhost1 ~]# cd /usr/src/
[root@localhost1 src]# wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
解压
[root@localhost1 src]# tar xf Python-2.7.15.tgz
[root@localhost1 src]# cd Python-2.7.15
[root@localhost1 Python-2.7.15]#
编译安装
[root@localhost1 Python-2.7.15]# ./configure --enable-optimizations
[root@localhost1 Python-2.7.15]# make
[root@localhost1 Python-2.7.15]# make altinstall
查看安装
[root@localhost1 Python-2.7.15]# /usr/local/bin/python2.7 -V
Python 2.7.15
设置软连接
[root@localhost1 Python-2.7.15]# mv /usr/bin/python{,-old}
[root@localhost1 Python-2.7.15]# ln -s /usr/local/bin/python2.7 /usr/bin/python
配置yum
[root@localhost1 Python-2.7.15]# sed -i 's/python/python-old/' /usr/bin/yum
安装pip
[root@localhost1 Python-2.7.15]# python -m ensurepip
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.3 setuptools-39.0.1
[root@localhost1 Python-2.7.15]# pip -V
pip 9.0.3 from /usr/local/lib/python2.7/site-packages (python 2.7)
Centos6.5安装python2.7与pip的更多相关文章
- CentOS6.5安装Python2.7和Pip
注:文中所写的安装过程均在CentOS6.5 x86下通过测试,安装的Python版本为2.7.12,Pip版本为8.1.2 主要参考博文:http://bicofino.io/2014/01/16/ ...
- 【Linux】 CentOS6.5安装Python2.7以及pip等工具
原文地址 CentOS6.5下是原来就有python的,我的镜像里面自带的python版本是2.6.6.如果想要自己更新一个更加新的python版本可以这么做: 安装python2.7安装包. 从官网 ...
- CentOS6.8 安装python2.7,pip以及yum
由于CentOS6.8里自带的yum所依赖的python是2.6.66版本,但是安装pip至少要求python是2.7版本,因而原有的2.6并不能卸载,又得安装新的2.7.之前安装的时候强制卸载了2. ...
- centos6.5安装python2.7、pip、numpy、scipy
1..安装Development Tools yum groupinstall -y 'development tools' 2.安装SSL.bz2.zlib来为Python的安装做好准备工作 yum ...
- CentOS 6.5上安装python2.7、pip以及Python命令行补全和yum冲突解决
目前CentOS6.5上自带的python版本为2.6,升级到python2.7会碰到很多问题.本文将介绍如何安装python2.7.pip以及python命令行补全. 一.如何安装python2.7 ...
- CentOS6.5上安装Python2.7和PIP
目前大部分用户使用的CentOS6.5上默认的Python还是2.6版本.升级到Python2.7碰到很多问题.本文将介绍如何安装Python2.7. 1. 安装必要的准备包 安装过程将用到gcc,方 ...
- Centos6.5安装Python2.7.9
1. 问题背景 Centos6.5默认自带的python环境是2.6.6,python的一些特性没法使用,所以要对python进行升级,借鉴了网上其他同学的安装教程,但是还是遇到一些坑,不是那木顺利, ...
- centos6.3安装python2.7, pip2.7, mysql
参考: https://github.com/h2oai/h2o-2/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-sequence-ex ...
- centos6.8 安装python2.7 or python3.6
from:https://danieleriksson.net/2017/02/08/how-to-install-latest-python-on-centos/ 准备 # Start by mak ...
随机推荐
- AWS系列-申请Redis
1.1 打开aws控制台,可以直接搜索redis 1.2 进入redis控制面板 点击启动缓存集群(这个只是启动创建的意思,不是启动下面创建好的node.我也不懂为啥翻译过来是这个意思...) 1.3 ...
- 自定义ScrollView 支持添加头部
自定义ScrollView 支持添加头部并且对头部ImageView支持放大缩小,上滑头部缩小,下滑头部显示放大 使用方式: scrollView = (MyScrollView) findViewB ...
- Mininet加强版——DOT(分布式OpenFlow试验平台)
前言 之前在做SDN实验的时候,需要用到包含2000+个交换机的fattree拓扑,当时用的是mininet,生成整个拓扑需要十五六个小时,最终在异常艰苦的环境下做完了实验,之后听说了有DOT(Dis ...
- less.js
在引入你自己的less文件的时候 <link rel="stylesheet/less" href="styles/site.less"> 之后再引 ...
- 移动APP自动化测试框架
简介 移动APP的UI自动化测试长久以来一直是一个难点,难点在于UI的”变”, 变化导致自动化用例的大量维护.从分层测试的角度,自动化测试应该逐层进行.最大量实现自动化测试的应该是单元测试,最容易实现 ...
- 创建TPL自定义模板
文件布局 <!--1d7c7a527b6335cc7a623305ca940e1findex.tpl.html--> <!DOCTYPE html PUBLIC "-//W ...
- 淘宝订单数据转CSV
<html> <body> <div id="result"> </div> <div> <textarea st ...
- simplest_ffmpeg_grabdesktop:屏幕录制。 simplest_ffmpeg_readcamera:读取摄像头
最简单的基于FFmpeg的AVDevice例子(屏幕录制) - 雷霄骅(leixiaohua1020)的专栏 - CSDN博客 https://blog.csdn.net/leixiaohua1020 ...
- jmeter断言之BeanShell断言
1.添加BeanShell断言,在Script下面写断言脚本,常用的BeanShell脚本如下: if(!SampleResult.getResponseCode().equals("200 ...
- django之多表查询-2
2018-11-14 一 \\ 基于双下划线的跨表查询: 套路一样,用__跨表 -一对多 -多对多 from app.models import * 查询出版社为北京出版社出版的所有图书的名字,价格 ...