LoginSignup
1
0

More than 3 years have passed since last update.

Ubuntu 20.04にPython 3.7をソースからビルドしてインストールする

Posted at

Ubuntu 20.04のPythonのバージョンは3.8です。
事情があってPython 3.7が必要だったので、ソースからビルドしてインストールしてみました。

準備

sudo apt install build-essential  -y
sudo apt install libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev -y
sudo apt install libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev libffi-dev uuid-dev -y
wget https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tgz
tar zxvf Python-3.7.10.tgz 
cd Python-3.7.10/
./configure --enable-optimizations
make -j4
sudo make altinstall
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0