打造编程环境

Python虚拟环境

基本命令

1.Windows最好配合ConEmu使用
工具链接: https://pan.baidu.com/s/1gVybZSQdU27hz0YZf8AWYw 密码: vevt


  • 查看版本
    conda info —envs

    conda env list

  • 注意,为了避免你的网络太慢,请先运行下面命令加速一些**
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
    conda config --set show_channel_urls yes

  • 安装完整版python2版本的conda
    conda create -n py2 python=2

  • 移除虚拟环境
    conda remove --all -n 3todo

  • 创建只有django的python2环境,名字py2-dj10,注意,python=2 django是连续参数
    conda create -n py2-dj10 python=2 django=1.10

  • 进入环境
    coa test

  • 退出环境
    cod

  • 删除虚拟环境
    cr test

    扫描二维码关注公众号,回复: 1654289 查看本文章

新建虚拟环境示意图:

自定义命令别名

Windows最好配合ConEmu使用。在settings->Startup>Environment


alias cl=conda env list
alias cc=conda create -n $
alias coa=activate $

alias cod=deactivate
alias cr=conda remove --all -n $*
---

猜你喜欢

转载自www.cnblogs.com/lshnice/p/9201952.html