当前位置: 首页 > news >正文

python3.10安装

python3.10 安装

文章目录

  • python3.10 安装
    • 0. 我的环境
    • 1. centos7.6 安装python3需要升级openssl
    • 2. 安装python3
    • 3. 查看python3版本

0. 我的环境

[root@ftp ~]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
[root@ftp ~]# openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017
[root@ftp ~]#

1. centos7.6 安装python3需要升级openssl

[root@ftp ~]# curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo[root@ftp ~]# yum install -y ncurses-devel gdbm-devel xz-devel sqlite-devel tk-devel uuid-devel readline-devel bzip2-devel libffi-devel[root@ftp ~]# yum install -y openssl-devel openssl11 openssl11-devel[root@ftp ~]# openssl11 version
OpenSSL 1.1.1k  FIPS 25 Mar 2021

2. 安装python3

python下载地址:https://www.python.org/ftp/python/

[root@ftp ]# mkdir -p /doc/temp && cd /doc/temp
[root@ftp temp]# wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz#注意:编译时需要使用最新openssl库
[root@ftp Python-3.10.14]# export CFLAGS=$(pkg-config --cflags openssl11)
[root@ftp Python-3.10.14]# export LDFLAGS=$(pkg-config --libs openssl11)#验证是否生效
[root@ftp Python-3.10.14]# echo $CFLAGS
-I/usr/include/openssl11
[root@ftp Python-3.10.14]# echo $LDFLAGS
-L/usr/lib64/openssl11 -lssl -lcrypto[root@ftp temp]# tar xf Python-3.10.14.tgz
[root@ftp temp]# cd Python-3.10.14#编译
[root@ftp Python-3.10.14]# ./configure --enable-optimizations && make altinstall#配置软连接
[root@ftp Python-3.10.14]# ln -sf /usr/local/bin/python3.10 /usr/bin/python3
[root@ftp Python-3.10.14]# ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3

3. 查看python3版本

[root@ftp Python-3.10.14]# python3 --version
Python 3.10.14
[root@ftp Python-3.10.14]# pip3 --version
pip 23.0.1 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)

http://www.mrgr.cn/news/17340.html

相关文章:

  • Python类详解
  • python办公自动化:使用`Python-PPTX`添加图表
  • RoadLib---这两年值得一看的建图定位项目
  • MC药水酿造
  • Mac系统内存怎么清理:一篇让你轻松摆脱卡顿的指南
  • 【Unity实战】Visual Studio Debug失败
  • 【Redis】Redis 客户端开发与 Java 集成:RESP协议解析与实战操作
  • 毕业论文免费查重网站
  • MicroNet关键代码解读(Micro-block与Dynamic Shift-Max的实现代码)
  • postgis
  • Vue 全局数据:提升开发效率的利器
  • Go语言的前世今生与未来展望
  • ⾳频重采样及基本概念
  • 数据结构:(LeetCode101)对称二叉树
  • 驱动开发系列17 - PCI总线
  • World of Warcraft [CLASSIC][80][Grandel]Sapphire Hive Drone
  • C语言中的预处理指令的其中之一——#line
  • 《JavaEE进阶》----7.<SpringMVC实践项目:【登录页面的验证】>
  • 产品入门篇笔记
  • 系统编程--进程间通信