Python3 的安装

# 下载依赖包
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
yum install -y gcc
# 下载安装包
wget -c https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz

# 解压

cd /tmp

tar xf Python-3.6.5.tgz
cd /tmp/Python-3.6.5

# 编译安装
./configure --prefix=/usr/local/python3
make && make install

# 创建软连接

ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3

# 安装一个django

pip3 install django==2.1.8

 

pip3 install mysql-connector -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

# 查看版本号

python3 --version

posted @ 2020-04-26 17:59  Hello_worlds  阅读(136)  评论(0编辑  收藏  举报