環境#
Ubuntu 20.04.1 LTS focal x86_64
下載 && 解壓縮#
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
解壓縮 xz 文件需要軟體包 xz-utils
tar -Jxvf Python-3.9.0.tar.xz
編譯 && 安裝#
cd Python-3.9.0
./configure
make
make install
錯誤解決方法#
No module named zlib#
編譯步驟中使用
./configure --with-zlib
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.#
安裝軟體包
libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.5 libgdm-dev libdb4o-cil-dev libpcap-dev