美文网首页
Linux 上安装 python

Linux 上安装 python

作者: 贾磊_cd | 来源:发表于2018-08-01 23:44 被阅读13次

    Step to install python on Linux system

    1. 下载python源码包并解压缩
    $ wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
    tar xf Python-3.*
    
    1. 进入到文件夹 build源码
    
    cd Python-3.*
    #Prepare compilation 
    ./configure
    #Build
    make
    
    1. 将python安装到系统
    #Install
    make install
    
    

    OR if you don't want to overwrite the python executable (safer, at least on some distros yum needs python to be 2.x, such as for RHEL6) - you can install python3.* as a concurrent instance to the system default with an altinstall:

    make altinstall
    

    安装中会出现的问题以及解决方法
    zipimport.ZipImportError: can't decompress data; zlib not available
    使用yum安装依赖zlib、zlib-devel

    相关文章

      网友评论

          本文标题:Linux 上安装 python

          本文链接:https://www.haomeiwen.com/subject/bymdvftx.html