CentOS7编译安装Python3.6.3
来源:互联网 发布:clean my mac有必要吗 编辑:程序博客网 时间:2024/06/06 00:35
系统环境:CentOS 7.3.10.0-693.el7.x86_64
前言:CentOS 7环境下已经自带了python2.7环境,但是如果需要使用最新的Python3则需要自行编译安装,以下为安装过程。
1、先解决依赖
# 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 wget
2、wget Python3.6.3;创建程序目录;编译安装
# wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz# mkdir -p /usr/local/python3# tar -zxvf Python-3.6.3.tgz# cd Python-3.6.3/# ./configure --prefix=/usr/local/python3 && make && make install
如无意外,则会安装完成,如有意外,请自行度娘解决!!!
3、建立Python3的软链接,并将/usr/local/python3/bin加入bash_profile
# ln -s /usr/local/python3/bin/python3 /usr/bin/python3# vim ~/.bash_profile
# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programs##下面这句为添加内容PATH=$PATH:$HOME/bin:/usr/local/python3/binPATH=$PATH:$HOME/binexport PATH
然后
# source ~/.bash_profile
查看Python3.6.3 pip3是否正常
# python3 -VPython 3.6.3# pip3 -Vpip 9.0.1 from /usr/local/python3/lib/python3.6/site-packages (python 3.6)
至此,Python3.6.3安装完毕,如出现其他错误可在评论区留言指出。
阅读全文
1 0
- CentOS7编译安装Python3.6.3
- Centos7-Python3.6.3安装
- Linux centos7 安装python3.6.3
- CentOS7安装Python3
- centos7下安装python3
- centos7安装python3.5
- Centos7安装Python3.5
- centos7安装Python3.5
- CentOS7安装Python3.6.0
- CentOS7安装Python3
- CentOS7安装python3.6.1
- CentOS7 安装Python3
- CentOS7安装Python3.6
- Centos7 Python3.5.2安装
- CentOS7安装Python3
- centos7安装python3
- centos7安装python3.6.2
- Centos7 安装Python3 Scrapy
- 局域网访问本地环境
- 使用HttpURLConnection访问网络接口,展示列表数据
- linux内核源码基础
- sql优化
- 巨杉数据库 王涛:如何打造金融级数据库
- CentOS7编译安装Python3.6.3
- CodeForces
- Result Maps collection already contains value for XXXX
- Android调试命令小结
- Java数据结构与算法解析(十五)——左式堆
- 正则表达式(括号)、[中括号]、{大括号}的区别小结
- 注册功能实现后台数据库添加用户信息
- fabric 结构分析区块链底层开发技术虚拟币
- win10上部署Hadoop-2.7.3——非Cygwin、非虚拟机