安装Python3

1.环境准备
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gcc*
2.安装步骤
[root@bogon ~]# cd /usr/local/src/
[root@bogon src]# wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
[root@bogon src]# tar -xf Python-3.6.5.tar.xz  
[root@bogon src]# cd Python-3.6.5
[root@bogon Python-3.6.5]# ./configure --prefix=/usr/local/python3
[root@bogon Python-3.6.5]# make && make install    
[root@bogon Python-3.6.5]# ln -s /usr/local/python3/bin/python3   /usr/bin/python3 
[root@bogon Python-3.6.5]# ln -s /usr/local/python3/bin/pip3  /usr/bin/pip3
3.验证
[root@bogon Python-3.6.5]# python3
Python 3.6.5 (default, Jan 23 2019, 03:09:17) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.

  

相关文章:

  • 2021-08-20
  • 2021-12-09
  • 2022-01-02
  • 2022-12-23
  • 2022-01-26
  • 2021-09-02
猜你喜欢
  • 2022-02-23
  • 2022-12-23
  • 2021-12-08
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案