CentOS7 下安装python3.7和pip3 并保留系统自带python2.7
1. 安装依赖环境
# yum -y ins 4000 tall zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
2. 下载Python3.7的安装包
# wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
3. 创建Python3的目录
# mkdir /usr/local/python3
4. 解压下载文件并切换目录
# tar -zxvf Python-3.7.0.tgz
# cd Python-3.7.0
5. 执行
# ./configure
若出错 可能因为gcc没有安装
yum -y install gcc
yum -y install gcc-c++
运行后会提醒
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
可以运行 ./configure --enable-optimizations 进行配置优化
# make && make install
6. 创建软链接
# ln -s /usr/local/python3/bin/python3 /usr/bin/python3
# ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
7.测试命令 python3 和 pip3
# python3 -V
# pip3 -V
- CentOS 6 安装 python 2.7 (系统自带Python2.6.6) (附easy_install安装, pip安装)
- centos7 安装python2.6,与系统自带的python2.7共存
- TensorFlow在MacOS和Windows下安装,史上最全问题解决方法(包括Mac OS系统自带Python2.7和安装的python3.7共存问题)
- CentOS升级Python2.6到Python2.7并安装pip
- CentOS6.5上安装Python2.7和PIP
- 【Linux】 CentOS6.5安装Python2.7以及pip等工具
- centos6.5系统用Python3.6.3安装pip
- CentOS5.5上安装Python2.7及ez_setup和pip包
- Ubuntu16.04自带Python2.7和Python3,为什么用pip安装的包在Python3中不能用
- CentOS6.5升级Python2.6到Python2.7并安装pip
- CentOS6.8升级Python2.6到Python2.7并安装pip
- 在centos 6系统中安装python2.7
- Linux编译安装Python3.X版本并保留系统自带的Python2.X版本
- CentOS升级Python2.6到Python2.7并安装pip
- CentOS 7-(64位)系统下安装Anaconda(Python3.x)及pip使用
- CentOS升级Python2.6到Python2.7并安装pip 96 作者 Ruter 关注 2015.12.20 22:14* 字数 588 阅读 8227评论 1喜欢 5 貌似CentOS
- centos6.8升级到python2.7及安装pip
- Windows系统下同时安装配置Python3.7和Python2.7
- centos安装python2.7,easy_install,pip
- Centos升级Python 2.7并安装pip、ipython