zoukankan      html  css  js  c++  java
  • ubuntu Python2 升级Python3

    今天买了一台阿里的服务器, 想搭建一个爬虫, 但是 服务器是python2的, 需要升级到python3 

    1. 下载python3的包

    wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz

    2. 解压 

    tar -zxvf Python-3.6.6.tgz

    3.配置编译

    ./configure --prefix=/usr/local/python3 --with-ssl

    4.安装

    make && make install

    5. 建立链接

    ln -fs python3 python

     如果第4报错, 那去百度搜吧

    我报的错是 

    can't decompress data; zlib not available

    说是 无法解压缩数据; zlib不可用

    那么按转一下 zlib这个包

    如果用下面的命令报 yum: command not found 那么需要安装yum       命令 apt-get install yum

    yum -y install zlib zlib-devel 

    香菇, 有报错了

    There are no enabled repos.
     Run "yum repolist all" to see the repos you have.

     You can enable repos with yum-config-manager --enable <repo>

    百度一下就解决了, 我这不想加了

  • 相关阅读:
    IE浏览器Ajax缓存问题小结
    2015第50周二
    2015第50周一了解微服务架构
    2015第49周日
    2015第49周六
    2015第49周五
    2015第49周四
    2015第49周三
    0当执行游戏xc000007b错误的解决方法
    微软的最高市值是多少?
  • 原文地址:https://www.cnblogs.com/yu-hailong/p/11080908.html
Copyright © 2011-2022 走看看