Linux环境下安装python3.6

安装python3.6可能使用的依赖
 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

下载python3.6编译安装

# wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
# tar -xzvf Python-3.6.5.tgz -C  /tmp
# cd  /tmp/Python-3.6.5/
把Python3.6安装到 /usr/local 目录
# ./configure --prefix=/usr/local
# make
# make install

python3.6程序的执行文件:/usr/local/bin/python3.6
python3.6应用程序目录:/usr/local/lib/python3.6
pip3的执行文件:/usr/local/bin/pip3.6


更改/usr/bin/python链接
# ln -s /usr/local/bin/python3.6 /usr/bin/python 此步骤忽略
# ln -s /usr/local/bin/python3.6 /usr/bin/python3
# ln -s /usr/local/bin/pip3.6   /usr/bin/pip3
 
posted @ 2020-04-25 12:46  技术研究与问题解决  阅读(155)  评论(0编辑  收藏  举报