centos安装Python3.5
作者:互联网
文章目录
centos安装Python3.5
安装python3.5可能使用的依赖
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
到python官网找到下载路径, 用wget下载
wget https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tgz
这里wget会将Python-3.5.4.tgz下载到当前目录,
就是你在哪个目录下执行的上述命令,它就会下载到哪里
建议下载到 /usr/local
tar -zxvf Python-3.5.4.tgz
删除旧版本的python依赖
ll /usr/bin | grep python
rm -rf /usr/bin/python
进入python目录
cd /usr/local/Python-3.5.4/
进行配置
./configure
编译,安装
make install
删除旧的软链接,创建新的软链接到最新的python
rm -rf /usr/bin/python
ln -s /usr/local/bin/python3.5 /usr/bin/python3.5
ln -s /usr/local/bin/pip3.5 /usr/bin/pip3.5
标签:bin,centos,python,devel,Python3.5,3.5,usr,安装,下载 来源: https://blog.csdn.net/weixin_44505901/article/details/117418334