Centos安装python3 发表于 2016-12-17 更新于 2020-08-09 分类于 Language 阅读次数: 阅读次数: Disqus: 1. 首先安装一些python需要的库 12yum groupinstall 'Development Tools'yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel 2. 下载python 源码编译安装 12345$ wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xztar Jxvf Python-3.5.0.tar.xz$ cd Python-3.5.0./configure --prefix=/usr/local/python3make && make install 3. python3.5 源码安装时会自动安装pip 如果没有pip,可以手动下载get-pip.py安装pip。 12$ wget https://bootstrap.pypa.io/get-pip.py$ python get-pip.py 4. 最后创建软链接 12$ ln -sv /usr/local/python3/bin/python3 /usr/bin/python3$ ln -sv /usr/local/python3/bin/pip3 /usr/bin/pip3