sudo yum -y install epel-release
sudo yum install wget make cmake gcc bzip2-devel libffi-devel zlib-devel
sudo yum -y groupinstall "Development Tools"
sudo yum install openssl-devel openssl11 openssl11-devel
sudo yum install readline-devel
wget https://www.python.org/ftp/python/3.11.0/Python-3.11.4.tgz
進入該資料夾
cd Python-3.11.4
編譯前準備
sudo LDFLAGS="${LDFLAGS} -Wl,-rpath=/usr/local/openssl/lib" ./configure --with-openssl=/usr/local/openssl
編譯
sudo make
安裝
sudo make altinstall
最後安裝完成
把連結做一下 以後用python3 與pip3就能直接作業
ln -s /usr/python/bin/python3 /usr/bin/python3
ln -s /usr/python/bin/pip3 /usr/bin/pip3
最後完成安裝
沒有留言:
張貼留言