用户工具

站点工具


zh:notes:install_python3.7

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
zh:notes:install_python3.7 [2019/08/15 21:56]
pzczxs [Upgrade Python]
zh:notes:install_python3.7 [2022/06/30 11:30] (当前版本)
pzczxs 讨论状态变化了
行 1: 行 1:
-====== Install ​Python3.7 ======+====== Install ​Python 3.7 ======
 ===== Operation System ===== ===== Operation System =====
-CentOS 6.8 (64 bits)+CentOS 6.8 (64 bits), CentOS 7.6 (64 bits)
  
-===== Install libffi-devel =====+===== Install libffi-devel and zlib-devel =====
 <code bash> <code bash>
-# If this package ​is not installed ahead, the following exception will be raised. ​+# If this library ​is not installed ahead, the following exception will be raised. ​
 # ModuleNotFoundError:​ No module named '​_ctypes'​ # ModuleNotFoundError:​ No module named '​_ctypes'​
 > yum install libffi-devel > yum install libffi-devel
 +
 +# If this library is not installed ahead, the following error will appear. ​
 +# zipimport.ZipImportError:​ can't decompress data; zlib not available
 +> yum install zlib-devel
 +
 +# This library should be installed ahead. ​
 +# Otherwise, when pandas package is imported in the python, the following exception will be raised. ​
 +# ModuleNotFoundError:​ No module named '​_bz2'​
 +> yum install ​ bzip2-devel
 </​code>​ </​code>​
  
行 20: 行 29:
  
 > cd Python-3.7.4 > cd Python-3.7.4
-> ./configure --prefix=/​usr/​local/​python3.6.--enable-optimizations+> ./configure --prefix=/​usr/​local/​python3.7.--enable-optimizations
 > make > make
 > make altinstall > make altinstall
行 26: 行 35:
 # redirect link # redirect link
 > mv /​usr/​bin/​python /​usr/​bin/​python.bak > mv /​usr/​bin/​python /​usr/​bin/​python.bak
-ln -s /​usr/​local/​python3.7.4/​bin/​python3.7 /​usr/​bin/​python+ln -s /​usr/​local/​python3.7.4/​bin/​python3.7 /​usr/​bin/​python 
 + 
 +# To check the version 
 +> python --version 
 + 
 +# Edit the shebang lines (first line) of the scripts yum and urlgrabber-ext-down 
 +# Change "#! /​usr/​bin/​python"​ to "#! /​usr/​bin/​python2"​ 
 +> vi /​usr/​bin/​yum 
 +> vi /​usr/​libexec/​urlgrabber-ext-down
 </​code>​ </​code>​
 +
 +~~DISCUSSION:​closed~~
zh/notes/install_python3.7.1565877385.txt.gz · 最后更改: 2019/08/15 21:56 由 pzczxs