CentOS安装python3.5.0

Posted 年岁有加,并非垂老

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS安装python3.5.0相关的知识,希望对你有一定的参考价值。

1安装编译工具
yum install zlib-devel bzip2-devel openssl-devel python-devel kernel-devel libffi-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make

2官网下载安装
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
解压 tar -xvJf Python-3.5.0.tar.xz
cd Python-3.5.0
./configure prefix=/usr/local/python3
make && make install

3安装pip3
1.首先安装setuptools
  小伙伴们可以通过官方模块库来下载:https://pypi.python.org/pypi
  这里我就直接用wget到服务器上下载了版本为19.6
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
tar -zxvf setuptools-19.6.tar.gz
cd setuptools-19.6
/usr/local/python3/bin/python3 setup.py build
/usr/local/python3/bin/python3 setup.py install
2.然后直接安装pip就搞定了。。
  同样先下载然后在执行命令搞定!!
wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb
tar -zxvf pip-8.0.2.tar.gz
cd pip-8.0.2
/usr/local/python3/bin/python3 setup.py build
/usr/local/python3/bin/python3 setup.py install

3用pip安装模块
/usr/local/python3/bin/pip3 install Django==2.1.1

























以上是关于CentOS安装python3.5.0的主要内容,如果未能解决你的问题,请参考以下文章

centos7怎么安装 centos7安装步骤

CentOS7安装Docker

centos7安装教程?

centos7怎么安装 centos7安装步骤

安装centos 7安装不了,有问题。

centos 7 minimal安装之后怎么设置