Linux 源码编译Python 3.6
1.操作系统以及版本显示
# uname -sr Linux 3.10.0-514.el7.x86_64
# uname -sr Linux 3.10.0-514.el7.x86_64
2.下载Python安装包
# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
3.开始进行编译安装python
3.1 解压python
# tar -xf Python-3.6.1.tar.xz
3.2 获取帮助
# cd Python-3.6.1/ # cat README.rst
3.3 查看编译的参数
# ./configure --help
3.4 开始编译
# yum install -y gcc gcc-c++ # ./configure --prefix=/usr/local/python-3.6 # make && make install
3.5 测试
[root@localhost Python-3.6.1]# /usr/local/python-3.6/bin/python3.6 Python 3.6.1 (default, May 10 2017, 08:59:54) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
4.出现的错误以及解决办法
在进行make install 的时候出现了以下信息,安装被终止
zipimport.ZipImportError: can't decompress data; zlib not available
解决办法:
相关推荐
以梦为马不负韶华 2020-10-20
huavhuahua 2020-11-20
weiiron 2020-11-16
cakecc00 2020-11-15
千锋 2020-11-15
JakobHu 2020-11-14
guangcheng 2020-11-13
xirongxudlut 2020-11-10
solarLan 2020-11-09
pythonxuexi 2020-11-08
文山羊 2020-11-07
susmote 2020-11-07
wuShiJingZuo 2020-11-05
Pythonjeff远 2020-11-06
jacktangj 2020-11-04
lousir 2020-11-04
YENCSDN 2020-11-17
lsjweiyi 2020-11-17
houmenghu 2020-11-17