1. 安裝依賴環境
#yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
#wget
3. 建立python3的目錄
#mkdir /usr/local/python3
#tar -zxvf python-3.a.b.tgz
#cd python-3.a.b
5. 執行
#./configure --prefix=/usr/local/python3
#make && make install
6. 建立python3的軟鏈結
#ln -s /usr/local/python3/bin/python3 /usr/bin/python3
7. 建立pip3的軟鏈結
#ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
8. 測試命令 python3 和 pip3
#python3
#pip3
安裝保留了原python命令呼叫python2
安裝完成
1. 安裝依賴環境
#yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
#wget
3. 建立python3的目錄
#mkdir /usr/local/python3
#tar -zxvf python-3.a.b.tgz
#cd python-3.a.b
5. 執行
#./configure --prefix=/usr/local/python3
#make && make install
6. 建立python3的軟鏈結
#ln -s /usr/local/python3/bin/python3 /usr/bin/python3
7. 建立pip3的軟鏈結
#ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
8. 測試命令 python3 和 pip3
#python3
#pip3
安裝保留了原python命令呼叫python2
安裝完成
centos下保留python2安裝python3
1.安裝依賴環境 yum y install zlib devel bzip2 devel openssl devel ncurses devel sqlite devel readline devel tk devel gdbm devel db4 devel libpcap devel xz d...
python保留字 python保留字有哪些
布林型別的值,表示假,與true對應 2 class 定義類的關鍵字 3 finally 異常處理使用的關鍵字,用它可以指定始終執行的 指定 在finally裡面 例如 class myexception exception pass try some code here raise myexcep...
Centos下python安裝 MySQLdb報錯
問題描述 centos下python安裝 mysqldb報以下錯誤 python setup.py build running build running build py running build ext building mysql extension creating build temp....