• Linux-安装python3环境


    Linux-安装python3环境

    [root@node1 ~]# yum -y groupinstall "Development tools"

    [root@node1 ~]# yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

    [root@node1 ~]# wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

    [root@node1 ~]# mkdir -p /usr/local/python3
    [root@node1 ~]# tar -zxf Python-3.6.1.tgz
     
    [root@node1 ~]# cd Python-3.6.1
    [root@node1 Python-3.6.1]# 
    [root@node1 Python-3.6.1]# 
    [root@node1 Python-3.6.1]# ls
    aclocal.m4    configure     Grammar     Lib      Makefile.pre.in  Objects  PCbuild        Python      Tools
    config.guess  configure.ac  Include     LICENSE  Misc             Parser   Programs       README.rst
    config.sub    Doc           install-sh  Mac      Modules          PC       pyconfig.h.in  setup.py
    [root@node1 Python-3.6.1]# ./configure --prefix=/usr/local/python3
    [root@node1 Python-3.6.1]# make && make install
    [root@node1 Python-3.6.1]# ln -s /usr/local/python3/bin/python3 /usr/bin/python3
     

     [root@node1 Python-3.6.1]# vim ~/.bash_profile

    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    PATH=$PATH:$HOME/bin:/usr/local/python3/bin
    
    export PATH

    [root@node1 Python-3.6.1]# source ~/.bash_profile

    [root@node2 Python-3.6.1]# pip3 install --upgrade pip

    Collecting pip
      Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)
        100% |████████████████████████████████| 1.4MB 155kB/s 
    Installing collected packages: pip
      Found existing installation: pip 9.0.1
        Uninstalling pip-9.0.1:
          Successfully uninstalled pip-9.0.1
    Successfully installed pip-19.1.1

    [root@node1 Python-3.6.1]# python3 -V

    Python 3.6.1

    [root@node1 Python-3.6.1]# pip3 -V

    pip 19.1.1 from /usr/local/python3/lib/python3.6/site-packages/pip (python 3.6) #这里如果没有显示不用执行下面命令

    [root@node1 Python-3.6.1]# ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

    这样就安装完成了

  • 相关阅读:
    《神经网络设计》读书笔记第一章
    <转>How to Encourage Your Child's Interest in Science and Tech
    <转>卷积神经网络是如何学习到平移不变的特征
    卷积神经网络物体检测之感受野大小计算
    神经网络向量化求反向传播梯度
    SSD框架训练自己的数据集
    object detect links
    Computer vision labs
    Deep Learning Blog lists
    YOLO: Real-Time Object Detection
  • 原文地址:https://www.cnblogs.com/kingzhe/p/11124527.html
Copyright © 2020-2023  润新知