How to install Python3.6.5 on Debian9

1. check installed python version
 
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-dev
if alert -bash: aptitude: command not found ,you need have to install aptitude
 
apt-get install aptitude
4. 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.5
7. enter and install it
 
cd Python-3.6.5/
./configure
8. move to other file 
 
./configure --prefix=/opt/python3.6.5
you 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 install
if you can see information as follows ,you installed it successfully
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.1 setuptools-28.8.0
10. clean
 
make clean 
make distclean

 
0
Donate 25-09-18

0 comments

If you wanna get more accurate answers,Please Login or Register