ubuntu18.04 compile and install python3.8

download##

# Download the source package to`opt`table of Contents
wget -c -P /opt https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
# Unzip
tar - xvf Python-3.8.0.tar.xz 
cd Python-3.8.0

Compile and install##

# Update system
apt-get update
apt-get upgrade
apt-get dist-upgrade
# Install dependent libraries
apt-get install libbz2-dev libncurses5-dev libgdbm-dev libgdbm-compat-dev liblzma-dev libsqlite3-dev libssl-dev openssl tk-dev uuid-dev libreadline-dev  python-dev

. /configure --enable-optimizations --enable-shared
make -j8
make altinstall

Run test##

python3.8
# python3.8: error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory

Configure the dynamic link library path

vim ~/.profile
# Append
export LD_LIBRARY_PATH="/usr/local/lib"
alias python="/usr/local/bin/python3.8"
alias python3.8="/usr/local/bin/python3.8"
# Update
source ~/.profile

The test is successful again!

Recommended Posts

ubuntu18.04 compile and install python3.8
Ubuntu 16.04 compile and install PHP 7.2
CentOS 6.9 compile and install python
CentOS 6 compile and install python 3
ubuntu18.04 install python2
ubuntu12.04 install python3
ubuntu18.04 install python
Compile and install QEMU under Ubuntu
[python] python2 and python3 under ubuntu
Install Python3 on Ubuntu 14.04
Ubuntu 18.04 source code compile and install ffmpeg4.1
Install python in Ubuntu
Install Python3 on Ubuntu 16.04
Install Python3.7 on Ubuntu
centos7 install python3 and ipython
CentOs7.3 compile and install Nginx 1.9.9
Install Python 3.7 on Ubuntu 18.04 LTS
Centos compile and install Git
ubuntu install and configure GitLab
CentOS7 install python3 and pip3
Centos7 compile and install ntp-4.2.8p11
Ubuntu16.04 install SVN and configuration
Ubuntu16.04 install and uninstall VMware-Workstation 14
Compile and install OpenJDK8 from source code under Ubuntu 18.04.1
CentOS Yum compile and install MySQL 5.6
Compile and install LAMP under Centos 5.2
Install and configure MySQL on Ubuntu
CentOS 6.x compile and install Nginx
Install and configure Docker in Ubuntu
CentOS7 compile and install L(A|N)MP environment
CentOS quickly install Python3 and pip3
How to install Python 3.8 on Ubuntu 18.04
Install and deploy Gerrit under Ubuntu
Install nodejs and npm under Ubuntu 16.04
Install Python3 and ansible under CentOS8
Install Python virtual environment on Ubuntu 18.04
Install TensorFlow (python2.7 version) on Ubuntu
Install Python3 and Py under CentOS7
Linux CentOS6 compile and install Pyt
How to compile and install PHP and Nginx in Ubuntu environment
Centos6 install Python2.7.13
Install the latest Python 3.6 version on Ubuntu
Install Gnome and VNC on Ubuntu Server
Compile and install libmodbus library under CentOS7
Ubuntu16 upgrade Python3
Centos7 install Python 3.6.
Relearn ubuntu --python3
CentOS install Python 3.6
Ubuntu install guide
CentOS7.5 source code compile and install mysql5.7.29
Centos7 install Python2.7
[Daily] Win10 open and install ubuntu subsystem
Ubuntu install Elasticsearch and elasticsearch-analysis-ik word segmentation
ubuntu install nodejs
ubuntu 16 install asp.net
ubuntu install leanote
Install docker on ubuntu and basic usage
Ubuntu19.10 compile and run C language program
Centos7 compile and install MySQL8 problem record
Python and Go
Install fonts on Ubuntu and switch default fonts