centos7 安装pip+python3.6

centos7安装pip

1.执行:yum install python-pip

若没有python-pip包,先执行:yum -y install epel-release,再执行yum install python-pip

2.pip install --upgrade pip

centos默认安装了python2.7

1.mkdir /usr/local/python3

2.安装依赖包:

yum -y groupinstall "Development tools"
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

3.在/usr/local/python3目录下

wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz

4.在/usr/local/python3目录下

tar -xvf  Python-3.6.2.tar.xzcd Python-3.6.2./configure --prefix=/usr/local/python3make && make install

5.切换到/usr/bin/目录下

mv python python.bakmv pip pip.bak
ln -s /usr/local/python3/bin/python3 /usr/bin/python
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip

6.防止以后用yum源安装软件时,报错

vi /usr/bin/yum
输入i,把文件开头第一行的

#!/usr/bin/python改成#!/usr/bin/python2.7

vi /usr/libexec/urlgrabber-ext-down

输入i,把文件开头第一行的

#!/usr/bin/python改成#!/usr/bin/python2.7

7.验证

输入python,进入python3.6.2

输入python2,进入python2.7

原文地址:https://www.cnblogs.com/caicaizi/p/9576424.html

时间: 2024-11-05 21:58:26

centos7 安装pip+python3.6的相关文章

centos7 安装pip+python3.6以及pip安装错误解决办法

Centos7安装pip 1.执行:yum install python-pip 若没有python-pip包,先执行:yum -y install epel-release,再执行yum install python-pip 2.pip install --upgrade pip centos默认安装了python2.7 1.mkdir /usr/local/python3 3.安装依赖包: yum -y groupinstall "Development tools" 安装的时候可

Redhat7/centOs7 安装配置python3.6.5

wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz mkdir /usr/local/python3 tar -xvJf Python-3.6.5.tar.xzcd Python-3.6.5./configure --prefix=/usr/local/python3make && make install ln -s /usr/local/python3/bin/python3 /usr/bin/python3

centos7 安装pip 和 Django过程

[[email protected] ~]# yum install python-pip 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.njupt.edu.cn * epel: mirrors.tongji.edu.cn * extras: mirrors.cqu.edu.cn * updates: mirrors.njupt.edu.cn 正在解决依赖关系 --> 正在检查事务 -

centos7安装pip

首先安装epel扩展源: yum -y install epel-release 更新完成之后,就可安装pip: yum -y install python-pip 安装完成之后清除cache: yum clean all 原文地址:https://www.cnblogs.com/peteremperor/p/9434351.html

CentOS 多版本python安装pip

首先配置环境 安装 zlib,zlib-devel,openssl,openssl-devel yum install zlib yum install zlib-devel yum install openssl yum install openssl-devel 重新编译安装python3.5 cd python解压后安装包路径 #生成 make #安装 make install 安装pip #python3出处请参照另一篇文章CentOS 安装python3.5 cd setuptool解

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 安装python3.8和pip

安装python3 yum -y install yum-utilsyum-builddep pythoncurl -O https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgztar xf Python-3.8.0.tgzcd Python-3.8.0./configuremakemake install 设置python3为默认版本 vi /etc/profile.d/python.sh #编辑用户自定义配置,输入alias参数?ali

centos7安装python3x,使用virtualenv创建python3的隔离环境

centos7默认python程序是2x,如果要使用3x可以使用EPEL仓库安装.同时为了使用隔离的python环境可以安装virtualenv. 1.启用EPEL sudo yum install epel-release 2. 安装python3 sudo yum install python34 3.给python2安装pip工具 sudo yum install python-pip 4.升级python2的pip工具 sudo pip install -U pip 5.安装virtua

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