1、下載
wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz

2、解壓縮和解歸檔
xz -d Python-3.7.3.tar.xz
tar -xvf Python-3.7.3.tar

3、補充依賴庫
sudo apt-get -y install libbz2-dev libncurses5-dev libgdbm-dev liblzma-dev libsqlite3-dev libssl-dev libreadline6-dev libffi-dev
4、進入Python源代碼目錄安裝前準備作業
cd Python-3.7.3
./configure –prefix=/usr/local/python37

5、構建安裝
make && make install

6、配置環境變數
vim .profile #有的是.bash_profile
i #進入編輯模式
export PATH=/usr/local/python37/bin:$PATH #在末尾添加
7、激活環境變數
source .profile
8、測驗是否安裝成功
python3 --version
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/250267.html
標籤:區塊鏈
上一篇:使用Zexe構建Aleo隱私應用——How Zero Knowledge is Rebalancing the Scales of the Internet
