标签:libpcap amp str add mkdir 2to3 centos7安装 tar span
1、安装前准备
centos7系统自带了Python2,而且这个Python2不能被删除,因为有很多系统命令,比如yum都要用到。
[root@test1 demos]# python --version Python 2.7.5 [root@test1 demos]# which python /usr/bin/python
下面安装Python3 :
首先安装依赖包:
yum -y groupinstall "Development tools" 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
2、安装
#下载安装包
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz #创建一个安装目录 mkdir /usr/local/python3 #解压压缩包,进入该目录,安装Python3 tar -xJf Python-3.6.5.tar.xz cd Python-3.6.5 ./configure --prefix=/usr/local/python3 make && make install
3、为命令创建软链接
[root@test1 Python-3.6.5]# cd /usr/local/python3/ [root@test1 python3]# ls bin/ 2to3 idle3 pip3.6 python3 python3.6m pyvenv 2to3-3.6 idle3.6 pydoc3 python3.6 python3.6m-config pyvenv-3.6 easy_install-3.6 pip3 pydoc3.6 python3.6-config python3-config [root@test1 python3]# ln -s /usr/local/python3/bin/python3 /usr/bin/python3 [root@test1 python3]# ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 [root@test1 python3]# python3 --version Python 3.6.5
标签:libpcap amp str add mkdir 2to3 centos7安装 tar span
原文地址:https://www.cnblogs.com/weiyiming007/p/10618540.html