1.Python3.6环境部署

标题:Python3.6环境部署文档

作者:刘耀

内容

  1. Linux部署Python3.6环境
  2. Mac部署Python3.6环境
  3. Window10部署Python3.6环境
  4. Pycharm安装

1. Linux部署Python3.6环境

  1. 登录官网找到Python3.6的下载地址

    [https://www.python.org/downloads/release/python-362/]

  2. 右键复制下载地址

    https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz

  3. 下载及安装[登录linux服务器]

    # yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel  [安装依赖]
    # yum -y install sqlite-devel readline-devel tk-devel gdbm-devel     [安装依赖]
    # yum -y install db4-devel libpcap-devel xz-devel                    [安装依赖]
    # yum -y install gcc gcc-c++
    # cd /root/
    # wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz [下载]
    # tar xf Python-3.6.2.tar.xz [解压]
    # cd Python-3.6.2
    # ./configure --prefix=/usr/local/python3.6
    # make
    # make install
    
  4. 运行解释器

    # cd /usr/local/python3.6/bin/
    # ./python3.6
    

    如图所示
    1505024093157

  5. 使用PIp

    pip相当于Python的模块管理工具,Python之所以强大原因之一就是第三方库的丰富
    # cd /usr/local/python3.6/bin/
    # ./pip3
    
  6. 配置环境变量

    #ln -s /usr/local/python3.6/bin/python3 /usr/bin/python3
    #ln -s /usr/local/python3.6/bin/pip3 /usr/bin/pip3
    

2. Mac部署Python3.6环境

  1. 使用brew工具管理

    brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件
    地址https://brew.sh/

  2. 安装brew

    使用终端工具
    # /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"    
    
  3. 使用brew安装Python3.6

    # 在终端输入以下命令:
    # brew install python3
    python安装完成,具体路径是:/usr/local/Cellar/python3/3.6.2/
    
  4. 运行解释器

    # cd /usr/local/Cellar/python3/3.6.2/bin/
    # ./python3
    

    33D273A0-8D1B-4122-92A5-A3245B168884

3. Window10部署Python3.6环境

  1. 登录官网找到Python3.6的下载地址

    [https://www.python.org/downloads/release/python-362/]

    22EFE97C-40FC-4468-9233-65C624A7BC7E

  2. 点击下载

  3. 安装

    python-window-1

    python-window-2

    python-window-3

  4. 进入解释器

    python-window-4

4. Pycharm安装

  1. 下载

    [https://www.jetbrains.com/pycharm/download]

  2. 选择

    pycharm-dow

  3. 安装

    过程省略

posted @ 2017-09-10 15:38  刘耀  阅读(2252)  评论(0编辑  收藏  举报