首頁 > 軟體

RHEL6從原始碼安裝Python及其他軟體包

2020-06-16 18:02:10

RHEL6從原始碼安裝Python及其他軟體包

## get zlib-devel source and build install it

$ wget --no-check-certificate http://zlib.net/zlib-1.2.8.tar.gz
$ tar -zxf zlib-1.2.8.tar.gz
$ cd zlib-1.2.8
$ ./configure
$ make && make install
#### /usr/local/include/zlib.h zconf.h


## python--->zlib-devel
## get python source and build install it
$ wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
$ tar -zxf Python-2.7.9.tgz
$ cd Python-2.7.9
$ ./configure -–with-zlib=/usr/local/include
$ make && make install
## test:
$ python
>>> import zlib


## python-setuptools
$ wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-15.0.tar.gz#md5=2a6b2901b6c265d682139345849cbf03
$ tar -zxf setuptools-15.0.tar.gz
$ cd setuptools-15.0
$ python setup.py build
$ python setup.py install


## MarkupSafe
$ wget --no-check-certificate https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz
$ tar -zxf MarkupSafe-0.23.tar.gz
$ cd MarkupSafe-0.23
$ python setup.py build
$ python setup.py install


## jinja2=>MarkupSafe
#### $ git clone https://github.com/mitsuhiko/jinja2.git
####$ wget --no-check-certificate https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
$ wget --no-check-certificate https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.0.tar.gz
$ tar -zxf Jinja2-2.7.3.tar.gz
$ cd Jinja2-2.7.3
$ python setup.py build
$ python setup.py install


## libyaml
$ wget --no-check-certificate http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
$ tar -zxf yaml-0.1.5.tar.gz
$ cd yaml-0.1.5
$ ./configure
$ make && make install
### /usr/local/include/yaml.h


## PyYAML--->libyaml
$ wget --no-check-certificate https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz#md5=f50e08ef0fe55178479d3a618efe21db
$ tar -zxf PyYAML-3.11.tar.gz
$ cd PyYAML-3.11
$ python setup.py build
$ python setup.py install
#### test
$ python
>>> import yaml

--------------------------------------分割線 --------------------------------------

CentOS上原始碼安裝Python3.4  http://www.linuxidc.com/Linux/2015-01/111870.htm

《Python核心程式設計 第二版》.(Wesley J. Chun ).[高清PDF中文版] http://www.linuxidc.com/Linux/2013-06/85425.htm

《Python開發技術詳解》.( 周偉,宗傑).[高清PDF掃描版+隨書視訊+程式碼] http://www.linuxidc.com/Linux/2013-11/92693.htm

Python指令碼獲取Linux系統資訊 http://www.linuxidc.com/Linux/2013-08/88531.htm

Ubuntu下用Python搭建桌面演算法交易研究環境 http://www.linuxidc.com/Linux/2013-11/92534.htm

Python 語言的發展簡史 http://www.linuxidc.com/Linux/2014-09/107206.htm


IT145.com E-mail:sddin#qq.com