Linux上安装Python3
2020-12-13 13:41
标签:很多 mkdir centos7 ncurses zip tool configure 代码 python2 1. 安装支持包 2. 下载源代码 3. 安装 4. 创建软链接 5. 测试 6. 注意 centos7原本就安装了Python2,而且这个Python2不能被删除,因为有很多系统命令,比如yum都要用到。 不要把Python3的安装目录覆盖Python2 :) enjoy Linux上安装Python3 标签:很多 mkdir centos7 ncurses zip tool configure 代码 python2 原文地址:https://www.cnblogs.com/want990/p/11532605.htmlyum -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
wget https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tar.xz
mkdir -p /usr/local/python3
mv Python-3.6.7.tar.xz /usr/local/python3/
cd /usr/local/python3
tar -xvJf Python-3.6.2.tar.xz
cd Python-3.6.7
./configure --prefix=/usr/local/python3
make && make install
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
python3
上一篇:Java Optional类
下一篇:JavaScript数据类型详解