• python实战第一天-环境的安装


    操作系统
    
    Ubuntu 15.10
    
    
    IDE & editor
    
    JetBrains PyCharm 5.0.2
    
    ipython3
    
    
    Python版本
    
    python-3.4.3
    

    安装Python

    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo apt-get install vim ipython3
    sudo apt-get install python3
    

    安装pip

    sudo apt-get install python3-pip
    

    使用pyenv来管理Python环境

    安装pyenv

    curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
    

    环境变量的设置

    export PATH="/home/jim/.pyenv/bin:$PATH"
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
    

    pyenv基本使用

    pyenv install 安装Python

    pyenv install 3.4.3
    
    (jim_test_ch01) jim@jim-virtual-machine:~$ pyenv versions #查看当前已安装的python版本
    * system
      3.4.3
    
    (jim_test_ch01) jim@jim-virtual-machine:~$ pyenv local 3.4.3 #local命令是指定当前使用那个版本
      system
    * 3.4.3
    
    (jim_test_ch01) jim@jim-virtual-machine:~$ pyenv virtualenv 3.4.3 jim_test_ch01   #创建虚拟环境
    

    pyenv local 设置使用Python版本

    pyenv local jim_test_ch01

    (jim_test_ch01) jim@jim-virtual-machine:~$ pyenv versions
      system
      3.4.3
      3.4.3/envs/jim_test_ch01_ch01
    * jim_test_ch01_ch01 (set by /home/jim/.python-version)
    

    安装jupyter

    pip3 install jupyter
    

    启动jupyter

    jupyter notebook --ip=0.0.0.0 --browser=firefox

    访问http://IP:8888/

  • 相关阅读:
    concate string when group by
    Regular Expression
    Login failed for user
    SQL Performance Tools
    Web References
    ARTetris-AR版俄罗斯方块的源码解析
    ARKit_1
    链表
    线性表
    ORB-SLAM2的特征提取算法
  • 原文地址:https://www.cnblogs.com/love19791125/p/5216325.html
Copyright © 2020-2023  润新知