How to install Python3.6.5 on Debian9
python
Python 2.7.9 (default, Mar 1 2015, 18:22:53)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
2. update software packages
apt-get update
apt-get upgrade
3. install some essential packages
aptitude -y install gcc make zlib1g-dev libffi-dev libssl-devif alert -bash: aptitude: command not found ,you need have to install aptitude
apt-get install aptitude4. download python3.6.5
wget [url=https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz]https://www.python.org/ftp/pyt ... 5.tgz[/url]
5. unzip it
tar -xvf Python-3.6.5.tgz
6.add authority to this file
chmod -R +x Python-3.6.57. enter and install it
cd Python-3.6.5/8. move to other file
./configure
./configure --prefix=/opt/python3.6.5you would see this infomation
If you want a release build with all optimizations active (LTO, PGO, etc), please run ./configure --enable-optimizations.9. install some other packages
aptitude -y install libffi-dev libssl-dev
make && make installif you can see information as follows ,you installed it successfully
Collecting setuptools10. clean
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.1 setuptools-28.8.0
make clean
make distclean