码迷,mamicode.com
首页 > 编程语言 > 详细

CentOS安装python3.5.0

时间:2018-10-15 00:38:52      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:==   tools   .gz   cat   上下   官方   tar.gz   解压   Fix   

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

标签:==   tools   .gz   cat   上下   官方   tar.gz   解压   Fix   

原文地址:https://www.cnblogs.com/linyouyi/p/9788846.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!