Python虚拟环境
下载安装
清华的镜像 [https://mirror.tuna.tsinghua.edu.cn/help/anaconda/]
Miniconda 安装包可以到 https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/ 下载。下载后直接默认安装
基本命令
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 $*
---