debian上安装python3.6

1.安装aptitude

sudo apt-get install aptitude

2.安装依赖包

sudo aptitude -y install gcc make zlib1g-dev libffi-dev libssl-dev

3.下载 Python 3.6.9

wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz

4.解压压缩包

tar -xzvf Python-3.6.9.tgz

5.进入文件夹,并执行安装配置

su - root

cd Python-3.6.9/

./configure --prefix=/usr/local/python36

make && make install

6.赋予权限

sudo chmod 777 -R /usr/local/python36

7.添加PATH环境变量

vim ~/.bashrc

export PATH=/usr/local/python36/bin:$PATH

source ~/.bashrc

posted @ 2019-10-02 14:57  DesignerA  阅读(8162)  评论(0编辑  收藏  举报