centos7 install python3

1. 过程

# 1. root权限, 安装依赖
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 gcc-c++

# 2. 从  https://www.python.org/ftp/python/  下载对应版本
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz

# 3. 创建 Python 3 目录
mkdir /usr/local/python3 

# 4. 解压下载文件并切换目录
tar -zxvf Python-3.6.4.tgz
cd Python-3.6.4/

# 5. 执行
./configure --prefix=/usr/local/python3
make && make install

# 6. 创建Python3的软链接, 创建Pip3的软链接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

参考:https://blog.csdn.net/x_koozal/article/details/72432906

原文地址:https://www.cnblogs.com/HurryXin/p/8955099.html

时间: 2024-11-06 03:38:06

centos7 install python3的相关文章

centos7安装python3和Django后,ModuleNotFoundError: No module named '_sqlite3'

1.准备安装环境 yum groupinstall 'Development Tools' yum install zlib-devel bzip2-devel openssl-devel ncurses-devel 2.安装python3 去官网下载编译安装包或者直接执行以下命令下载 wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz 解压 tar -xvJf  Python-3.6.2.tar.xz 切换进入 cd

Centos7 安装Python3.6.5 及 安装ipython 6.1.0

一.centos7 安装 Python3.6.5教程 1.在安装Python之前,需要先安装一些后面遇到的依赖问题(如果有依赖问题,按照提示安装): 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     yum install xz gcc zlib 

CentOS7.5 Python3安装pip报错:ModuleNotFoundError: No module named '_ctypes' --Python3

1.问题:pyhontModuleNotFoundError: No module named '_ctypes'  操作系统:CentOS7.5 安装完Pyhotn3后(如何安装Python3,安装后我的python.python3命令指向python3;python2命令和python2.7指向python2.7),发现没有安装两个版本都没有pip.所以下载好pip包,用系统自带python2安装如下所示: [root@VM_39_157_centos ~]# wget https://fi

centos7 install vim8

centos7 install vim8 Git and dependency Git: https://github.com/vim/vim # yum install -y perl-devel configure CFLAGS="-I/usr/lib64/perl5/CORE/" ./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-pythoninterp=yes

CentOS7 Install Shipyard

# 采集木jj 原文:http://www.cnblogs.com/caoguo/p/5735189.html # CentOS7 Install Shipyard# yum install docker# systemctl restart docker# docker login -u user-p password -e sample.aliyun.com registry.aliyuncs.com # 上面docker加速一大段实际就下面这一句# vi /etc/sysconfig/do

Centos7 install Openstack - (第四节)添加计算服务(Nova)

Centos7 install Openstack - (第四节)添加计算服务(Nova) 我的blog地址:http://www.cnblogs.com/caoguo 该文根据openstack官方文档配置 官方文档地址: http://docs.openstack.org/juno/install-guide/install/yum/content/# 0x01. Install and configure controller node (在控制节点安装配置一下内容) 一) 配置基本环境

CentOS7 Install Consul

Centos7 Install Consul 原文链接:http://www.cnblogs.com/caoguo/p/5959962.html 1) 环境 192.168.217.158 consul-1 192.168.217.159 consul-2 192.168.217.160 consul-3 192.168.217.161 agent-1 2) 安装 # yum install -y unzip # wget https://releases.hashicorp.com/consu

centos7 install httpd

[1]Install Httpd for Centos7-media # yum --enablerepo=centos7-media -y install httpd Installed:   httpd.x86_64 0:2.4.6-18.el7.centos [2]start httpd,开机启动 # systemctl start httpd.service # systemctl enable httpd.service ln -s '/usr/lib/systemd/system/h

centos7 install lnmp

centos7 install lnmp yum install epel-releaseyum install php php-fpm nginx mariadb-devel mariadb-server mariadb test php 模块 vim /etc/nginx/nginx.confnotice:在location 下面添加这一行就可以 location ~* \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FI