Linux | 软件安装
作者:互联网
Linux 源码安装软件
安装 Python 3.6
1. 安装依赖工具
sudo apt-get install -y gcc make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev
2.下载源码文件压缩包
mkdir /usr/local/python3.6
cd /usr/local/python3.6
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz
3.解压文件夹
tar -xzf Python-3.6.8.tgz
4.配置编译时程序存放的路径
cd Python-3.6.8
sudo ./configure --enable-optimizations --prefix=/usr/local/bin/python3.6
5. 编译
sudo make
# 莫名其妙的很长时间
6. 安装
sudo make install
7. 设置软连接
sudo ln -s -f /usr/local/bin/python3.6/bin/python3.6 /usr/bin/python3.6
sudo ln -s -f /usr/local/bin/python3.6/bin/pip3.6 /usr/bin/pip3.6
# sudo ln -s -f /usr/local/bin/python3.6/bin/python3.6 /usr/bin/python3
# sudo ln -s -f /usr/local/bin/python3.6/bin/pip3.6 /usr/bin/pip3
标签:bin,local,sudo,dev,python3.6,usr,Linux,软件,安装 来源: https://www.cnblogs.com/FutureHolmes/p/15424568.html