[Python]_ELVE_centos7安裝Python3.7.1與Python2共存

注:該博客轉載至PengYunjing博客,加以改動。html

#0x01 安裝依賴環境python

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 libffi-devel

#0x02 獲取python3.7.1sql

wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz

#0x03 建立目錄測試

mkdir /usr/local/python3

#0x04 解壓並進入安裝目錄spa

tar -zxvf Python-3.7.1.tgz
cd Python-3.7.1

#0x05 安裝code

./configure --prefix=/usr/local/python3
make && make install

#0x06 建立軟鏈接sqlite

ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

#0x07 測試htm

python3 -V
pip3 -V

完成✅blog

相關文章
相關標籤/搜索