ubuntu16.04纯净版-安装Python3.8.1
0.配置依赖环境,如果不进行这步可能会出现一些问题
sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev
1.去官网下载Python-3.8.1.tar.xz
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tar.xz
2.解压下载的包
tar -xvJf Python-3.8.1.tar.xz
3.进入解压后的目录
cd Python-3.8.1/
4.安装依赖
执行下列命令安装依赖过程中,如有提示,一律 y 。
sudo apt-get install python-dev
sudo apt-get install libffi-dev
sudo apt-get install libssl-dev
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
5.anzhuang
./configure --with-ssl
make
sudo make install
6.tianjiayinyong
#将原来的链接备份
mv /usr/bin/python /usr/bin/python.bak
#添加python3的软链接
ln -s /usr/local/python3/bin/python3 /usr/bin/python
#测试是否安装成功了
python -V
相关推荐
YENCSDN 2020-11-17
lsjweiyi 2020-11-17
houmenghu 2020-11-17
Erick 2020-11-17
HeyShHeyou 2020-11-17
以梦为马不负韶华 2020-10-20
lhtzbj 2020-11-17
夜斗不是神 2020-11-17
pythonjw 2020-11-17
dingwun 2020-11-16
lhxxhl 2020-11-16
坚持是一种品质 2020-11-16
染血白衣 2020-11-16
huavhuahua 2020-11-20
meylovezn 2020-11-20
逍遥友 2020-11-20
weiiron 2020-11-16