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参数?alias python=‘/usr/local/bin/python3.8‘?source /etc/profile.d/python.sh     #重启会话使配置生效

安装pip

wget https://bootstrap.pypa.io/get-pip.py?python get-pip.py -i https://pypi.tuna.tsinghua.edu.cn/simple/

原文地址:https://www.cnblogs.com/wintrysec/p/11963807.html

时间: 2024-10-05 00:13:12

Centos7 安装python3.8和pip的相关文章

CentOS7 安装 Python3.8后 pip 安装报错

[[email protected] Python-3.8.0]# pip install bs4 Collecting bs4 Using cached https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz ERROR: Command errored out with exit status 1: c

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安装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

先看编译安装,编译安装后的文件目录基本和Windows平台上目录差不多.指定安装路径的话,所有的文件都是在一起的.后面有yum的安装的方法. 编译安装 编译安装,会装好setuptools和pip这两个工具,都在site-packages这个文件夹里.之后再用pip安装各种模块,也都在pip所在的site-packages文件夹里.总之,所有的东西都在python3的安装目录下. 下载安装包 [[email protected] ~]# cd ~ [[email protected] ~]# m

centos7安装python3.7

本想对照自己之前的记录来安装python3,结果使用多年的nyfedit突然罢工,连数据也损坏了,多年的积累就这样回归虚无... 再次记录centos7.5安装python3过程 下载安装包 官网 cd /usr/local/src wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz 安装 # 依赖 yum install -y zlib-devel bzip2-devel readline-devel openssl-de

CentOS7安装Python3.5

2. 安装Python的依赖包 yum -y groupinstall "Development tools" yum -y install openssl-devel sqlite-devel bzip2-devel ncurses-devel gdbm-devel readline-devel tcl-devel tk-devel xz-devel zlib-devel db4-devel libpcap-devel 2. 下载Python3.5的源码包并编译 cd /usr/lo

Centos7安装Python3的方法

由于centos7原本就安装了Python2,而且这个Python2不能被删除,因为有很多系统命令,比如yum都要用到. [[email protected]_105_217_centos Python-3.6.2]# python Python 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2 Type "help", "copyright"

centos7安装python3 以及tab补全功能

1.安装python3 1.1下载python源码包 网址:https://www.python.org/downloads/release/python-362/ 下载地址:https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz 1.1.1安装python前的库环境,非常重要 yum install gcc patch libffi-devel python-devel  zlib-devel bzip2-devel openssl-d

CentOS7安装python3.6

下载包 去官网下载最新的python安装包 官网地址: https://www.python.org/downloads/ 安装python3.6可能使用的依赖 yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel yum install -y readline-devel.x86_64 (一定要安装这个包,不然升级完成后会发现删除退格键用不了) 时间同步 ntpdate