Python开发环境搭建(02):Python3.7+Redhat7源码安装

  1. 准备编译环境(环境如果不对的话,可能遇到各种问题,比如wget无法下载https链接的文件)
    yum groupinstall 'Development Tools'
    yum install zlib-devel bzip2-devel  openssl-devel ncurses-devel libffi-devel -y

    站在用户的角度思考问题,与客户深入沟通,找到宝应网站设计与宝应网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站设计、网站建设、企业官网、英文网站、手机端网站、网站推广、空间域名、网络空间、企业邮箱。业务覆盖宝应地区。

  2. 下载 Python3.7源码包

    • 打开网站
      https://www.python.org/

    • Downloads-->Source code
      Python 开发环境搭建(02):Python 3.7 + Redhat 7 源码安装

    • 下载最新版
      Python 开发环境搭建(02):Python 3.7 + Redhat 7 源码安装

    • 单击下载
      https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
      Python 开发环境搭建(02):Python 3.7 + Redhat 7 源码安装

  3. 解压
    tar Jxvf Python-3.7.2.tar.xz

  4. 解析 & 安装
    ./configure --prefix=/opt/python3 --enable-optimizations
    make && make install

  5. 做软链接:
    ln -s /opt/python3/bin/python3.7 /usr/local/bin/python3
    ln -s /opt/python3/bin/pip3.7 /usr/local/bin/pip

  6. 验证
    Python 开发环境搭建(02):Python 3.7 + Redhat 7 源码安装

  7. 升级pip到最新版本:
    pip install --upgrade pip
    Python 开发环境搭建(02):Python 3.7 + Redhat 7 源码安装

    1. 如果提示:Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS
      这是原因没有安装或升级oenssl:
      yum install openssl-devel
      再次重复编译方案python3.7:

    2. --no-check-certificate 表示安装时“不检查证书”,不加上可能无法安装。

  8. 安装包
    pip install django
    pip install pyMySQL
    pip install cx_Oracle


当前标题:Python开发环境搭建(02):Python3.7+Redhat7源码安装
网站路径:http://bzwzjz.com/article/gjshdg.html

其他资讯

Copyright © 2007-2020 广东宝晨空调科技有限公司 All Rights Reserved 粤ICP备2022107769号
友情链接: 网站建设推广 成都网站建设 成都网站制作公司 网站建设费用 成都网站制作 温江网站设计 网站建设方案 营销型网站建设 攀枝花网站设计 手机网站建设套餐 成都网站制作 成都网站建设 成都h5网站建设 成都做网站建设公司 成都网站建设 成都网站建设公司 成都网站建设 宜宾网站设计 网站制作 成都网站设计制作公司 重庆电商网站建设 网站制作