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

Linux中安装python3.8

源码安装 Python 3.8

安装编译所需的依赖:首先安装一些编译 Python 所需的依赖包:

yum groupinstall "Development Tools"
yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel

下载 Python 3.8 源码

cd /usr/src
sudo wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz

解压源码包

sudo tar xzf Python-3.8.0.tgz
cd Python-3.8.0

编译和安装 Python 3.8

sudo ./configure --enable-optimizations
sudo make altinstall

验证安装

[root@host test]# python3.8 --version
Python 3.8.0

报错解决:

[root@host test]# python3 jiankongtest.py 
/usr/local/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
  from cryptography.hazmat.backends import default_backend
 * Serving Flask app 'jiankongtest' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
/usr/local/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
  from cryptography.hazmat.backends import default_backend
 * Debugger is active!
 * Debugger PIN: 441-708-060

安装 pip

yum install python38-pip

 手动安装:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.8 get-pip.py

 安装 Flask 和 Paramiko

python3.8 -m pip install flask paramiko

 运行 Flask 项目

python3.8 jiankongtest.py

 


http://www.kler.cn/news/355654.html

相关文章:

  • userspace 和 kernelspace
  • 【算法】力扣:复制含有随机指针节点的链表
  • Python速成笔记——知识:图像操作
  • 十三、行为型(策略模式)
  • 数据结构顺序表超详细 (通讯录相关联) 含源码 C语言
  • uniapp移动端优惠券! 附源码!!!!
  • 数据库血缘工具学习,使用以及分享
  • 状态设计模式
  • JavaScript 第20章:Web Workers
  • 设计一个高效的日志分析系统:自动检测错误日志的实用指南
  • 计算机网络架构实例
  • Rocketmq 发送消息超时踩坑,消费正常
  • AJAX——HTTP 协议请求报文和响应报文结构
  • 字节跳动青训营——入营考核解答(持续更新中~~~)
  • 《 C++ 修炼全景指南:十六 》玩转 C++ 特殊类:C++ 六种必备特殊类设计的全面解析
  • C#第四讲:C#语言基本元素概览,初识类型、变量与方法,算法简介
  • nginx配置多个SSL证书实操记录
  • Qt 支持打包成安卓
  • RestClient查询文档match查询、精确查询和布尔查询
  • SSD |(七)FTL详解(中)