Created
March 14, 2020 08:41
-
-
Save Ningensei848/75fb2819675e53e12032eb8f8eab9220 to your computer and use it in GitHub Desktop.
Install python (3.8.2) on ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Install Python3.8.2 (cf. https://www.python.jp/install/ubuntu/index.html)" | |
echo "How to use: 'sudo bash install_python.sh'" | |
sudo apt-get -y update | |
sudo apt-get -y install build-essential libbz2-dev libdb-dev libreadline-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libsqlite3-dev libssl-dev zlib1g-dev uuid-dev tk-dev | |
curl -O https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz | |
tar xzf Python-3.8.2.tgz | |
cd Python-3.8.2 | |
./configure --enable-shared | |
make | |
sudo make install | |
sudo sh -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/custom_python3.conf" | |
sudo ldconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ubuntuに最新Pythonを入れたいが、毎回ポチポチするのは面倒
sudo bash install_python.sh
とすれば自動で全てやってくれるようにしたcf. https://www.python.jp/install/ubuntu/index.html
この場合、デフォルトのpython3系が「
python
」コマンドで上書きされることに注意(避けたい場合、
sudo make install
後の2行をコメントアウトすること)