Python系列之入门篇——python2.7.13安装
Python2.7.13 安装
说明
以下所有操作都基于centos6.9
1. Issue
zlib zlib-devel是安装setuptools依赖的模块,需要在安装python之前先安装这两个模块
2. Install Base
#基础依赖
yum -y install gcc gcc-c++ zlib zlib-devel openssl-devel
#删除当前mysql版本
yum remove MySQL-server-5.6.21-1.el6.x86_64 MySQL-client-5.6.21-1.el6.x86_64 MySQL-devel-5.6.21-1.el6.x86_64
#重新安装mysql-dev
yum -y install mysql-devel.x86_64
3. Install python2.7.13.tar.gz
cd /ddhome/usr/python2.7.13
./configure
make && make install
which python
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python /usr/bin/python
4. Install setuptools-33.1.1.zip
(pip 安装需要用到setuptools模块)
cd /ddhome/usr/setuptools-33.1.1
python setup.py install
5. Install pip-9.0.1.tar.gz
cd /ddhome/usr/pip-9.0.1
python setup.py install
5.1 ssl
开启ssl模块,要不然pip安装https请求的所有模块都会失败,而且必须在make之前完成
先配置python,即先运行 ./configure, 会出现./Module/Setup文件
vim Module/Setup, 修改如下
# Socket module helper for socket(2)
_socket socketmodule.c timemodule.c
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
#SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
6 python的图形编程接口, 使用matplotlib做图时需要
# centos
yum install -y tkinter tk-devel
# ubuntu
sudo apt-get install python-tk
7. Install pandas numpy matplotlib seaborn scipy hdfs pyinotify
python mysql lib: MySQL-python PyMySQL
MySQL-python 停止更新,不支持python3
PyMYSQL 支持python3
pip install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install seaborn scipy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install hdfs MySQL-python interval
8.pyecharts相关依赖包
pip install pyecharts
# Geo Data extensions
pip install echarts-cities-pypkg
# Map extensions
pip install echarts-countries-pypkg
pip install echarts-china-provinces-pypkg
pip install echarts-china-cities-pypkg
pip install echarts-china-counties-pypkg
pip install echarts-china-misc-pypkg
pip install echarts-united-kingdom-pypkg
Python系列之入门篇——python2.7.13安装的更多相关文章
- Python系列之入门篇——MYSQL
Python系列之入门篇--MYSQL 简介 python提供了两种mysql api, 一是MySQL-python(不支持python3),二是PyMYSQL(支持python2和python3) ...
- Python系列之入门篇——HDFS
Python系列之入门篇--HDFS 简介 HDFS (Hadoop Distributed File System) Hadoop分布式文件系统,具有高容错性,适合部署在廉价的机器上.Python ...
- Python系列之入门篇——pytables及其客户端
pytables及其客户端查看 pytables # ubuntu sudo apt-get install python-tables pip install flask flask-httpaut ...
- Pandas系列之入门篇——HDF5
Pandas系列之入门篇--HDF5 简介 HDF5(层次性数据格式)作用于大数据存储,其高效的压缩方式节约了不少硬盘空间,同时也给查询效率带来了一定的影响, 压缩效率越高,查询效率越低.pandas ...
- Pandas系列之入门篇
Pandas系列之入门篇 简介 pandas 是 python用来数据清洗.分析的包,可以使用类sql的语法方便的进行数据关联.查询,属于内存计算范畴, 效率远远高于硬盘计算的数据库存储.另外pand ...
- 【转】C# 串口操作系列(1) -- 入门篇,一个标准的,简陋的串口例子。
C# 串口操作系列(1) -- 入门篇,一个标准的,简陋的串口例子. 标签: c#objectnewlineexceptionbytestring 2010-05-17 01:10 117109人阅读 ...
- Docker入门篇(一)安装docker
Docker入门篇(一)安装docker Docker的来源 由dotCloud公司首创及正式命名,但是企业规模小,影响力不够,所以在快要坚持不住的时候,开始吃百家饭--开源了.不开则已,一开惊人.越 ...
- Python网络爬虫入门篇
1. 预备知识 学习者需要预先掌握Python的数字类型.字符串类型.分支.循环.函数.列表类型.字典类型.文件和第三方库使用等概念和编程方法. 2. Python爬虫基本流程 a. 发送请求 使用 ...
- 懂一点Python系列——快速入门
本文面相有 一定编程基础 的朋友学习,所以略过了 环境安装.IDE 搭建 等一系列简单繁琐的事情. 一.Python 简介 Python 英文原意为 "蟒蛇",直到 1989 年荷 ...
随机推荐
- LeetCode-Largest Rectangle in Histogram O(n) 详析-ZZ
http://www.cnblogs.com/felixfang/p/3676193.html Largest Rectangle in Histogram Given n non-negative ...
- C++ 无名对象
http://blog.sina.com.cn/s/blog_5f0e13360100bxlj.html 可以直接调用构造函数产生无名对象. 例如,下面的代码在函数fn()中,创建了一个无名对象: c ...
- Detecting Client Connection in WCF Long Running Service (Heartbeat Implementation) z
Download source - 45.3 KB Introduction Hello everyone! This is my first blog on WCF and I hope that ...
- C++的extern关键字
extern是一个声明,不是一个定义,A模块想应用B模块的一个函数或者变量,A模块包含B模块的头文件,并且在变量或者头文件前,加 extern,虽然编译的时候,找不到模块的定义,但是在连接的时候,会在 ...
- 纯CSS画的基本图形
图形包括基本的矩形.圆形.椭圆.三角形.多边形,也包括稍微复杂一点的爱心.钻石.阴阳八卦等.当然有一些需要用到CSS3的属性,所以在你打开这篇文章的时候,我希望你用的是firefox或者chrome, ...
- Spark Executor内幕彻底解密:Executor工作原理图、ExecutorBackend注册源码解密、Executor实例化内幕、Executor具体工作内幕
本课主题 Spark Executor 工作原理图 ExecutorBackend 注册源码鉴赏和 Executor 实例化内幕 Executor 具体是如何工作的 Spark Executor 工作 ...
- vmware虚拟机添加新硬盘
1 vmware中添加硬盘 2 重启虚拟机后,fdisk -l 查看已经挂在好的硬盘,比如/dev/sdb3 mkfs.ext3 /dev/sdb4 挂在: mount /de ...
- MATLAB入门学习(七)
开始,线性代数和微积分了,不怕.不怕. 背命令就行了... 线性代数 解线性方程组: Ax=b A是系数矩阵,x未知数,b是列向量 如果有唯一解,直接x=b\A 第二 B=null(A,'r')求Ax ...
- 从数据库反向生成django的models
有办法实现django 数据库反向生成models的方法吗?答案是肯定的. 1. 配置 settings.py 中的数据库配置部分 DATABASES = { 'default': { 'ENGINE ...
- 【转】android 常用theme
android:theme="@android:style/Theme.Dialog" : Activity显示为对话框模式android:theme="@android ...