• 注册
    • 回帖总排行
    • 采纳总排行
    • 财富排行榜
    • 等级排行榜
  • learner
    We are the best gift for each other
    3002511金币
    关注
  • admintest
    We are the best gift for each other
    25金币
    关注
  • 讓歷史重演
    We are the best gift for each other
    2金币
    关注
  • 冰冷
    We are the best gift for each other
    2金币
    关注
  • 扬子江
    We are the best gift for each other
    2金币
    关注
  • 空白格‭
    We are the best gift for each other
    2金币
    关注
  • 相似的清风
    We are the best gift for each other
    2金币
    关注
  • 神经蛙
    We are the best gift for each other
    2金币
    关注
  • 高谈
    We are the best gift for each other
    2金币
    关注
  • 低调
    We are the best gift for each other
    2金币
    关注
  • learner
    We are the best gift for each other
    老铁/ 443 经验
    关注
  • admintest
    We are the best gift for each other
    小兵/ 7 经验
    关注
  • 讓歷史重演
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 冰冷
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 扬子江
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 空白格‭
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 相似的清风
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 神经蛙
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 高谈
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 低调
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 关注: 内容:

    CentOS7安装Python3.6.6并配置环境最新详细教程

  • 查看作者
  • 打赏作者
  • 拉黑名单
    • 第一步 下载Python3.6包

      这里有两种下载方法

      1. 官网下载

      mkdir /usr/local/python31

      第二步 安装相关依赖

      这是很重要的一步需要认真完成,目前看到的教程里很少有整合这一步的。

      mkdir /usr/local/python3
      cd  /usr/local/python3
      tar -xvJf Python-3.6.6.tar.xz123

      第四步 配置Python安装信息

      注意这一步必须在安装的文件夹下完成,比如我们这里安装的python 3.6.6需要分别执行:

      ./configure --prefix=/usr/local/python3     #如果没有安装gcc这个会报错
      
      make && make install     #这个时间贼长!123

      第五步 创建软连接

      这一步就是允许我们可以直接再centos命令行下调用python3 和pip3
      但是注意,这里pip3 可能是一个坑,因为本人在配置centos7的python3环境时遇到找不到pip3的问题,解决的方案就是单独python3下载对应的pip,这个后面会提到。

      分别执行:

      cd1

      回到根目录,然后分别输入

      sudo yum -y install epel-release # CentOS yum源 中默认没有 pip,需要安装 扩展源EPEL
      sudo yum -y install python3-pip #安装pip312

      第七步 修改yum、使得python2和python3共存

      第一步
      vi  /usr/lcoal/yum1

      CentOS7安装Python3.6.6并配置环境最新详细教程

      第二步

      修改如图的内容
      CentOS7安装Python3.6.6并配置环境最新详细教程

      你需要登录,才能进行发帖操作
    • 单栏布局 帖子间隔 侧栏位置: