zoukankan      html  css  js  c++  java
  • 使用miniconda创建python虚拟环境

    安装python指定环境

    conda create -n oldboy python=3.6.5

    安装环境的同时安装相应的包

    conda create -n oldboy python=3.6.5 pandas

    进入指定的环境

    activate oldboy

    退出当前环境

    deactivate oldboy

    显示所有的环境

    conda env list

    # conda environments:
    #
    base                  *  D:miniconda3
    PCC                      D:miniconda3envsPCC
    TDD                      D:miniconda3envsTDD
    Web_Spider               D:miniconda3envsWeb_Spider
    oldBoy18                 D:miniconda3envsoldBoy18
    oldboy                   D:miniconda3envsoldboy
    

    删除指定的环境

    conda env remove -n oldBoy18

    Remove all packages in environment D:miniconda3envsoldBoy18:
    
    
    ## Package Plan ##
    
      environment location: D:miniconda3envsoldBoy18
    
    
    The following packages will be REMOVED:
    
        certifi:        2016.2.28-py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        pip:            9.0.1-py36_1     https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        python:         3.6.2-0          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        setuptools:     36.4.0-py36_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        vc:             14-0             https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        vs2015_runtime: 14.0.25420-0     https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        wheel:          0.29.0-py36_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        wincertstore:   0.2-py36_0       https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
    
    Proceed ([y]/n)? y
    

    导出当前环境的package信息

    conda env export > environment.yaml

    environment.yaml

    name: oldboy
    channels:
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
      - defaults
    dependencies:
      - python=3.6.5=h0c2934d_0
      - certifi=2016.2.28=py36_0
      - pip=9.0.1=py36_1
      - setuptools=36.4.0=py36_1
      - vc=14=0
      - vs2015_runtime=14.0.25420=0
      - wheel=0.29.0=py36_0
      - wincertstore=0.2=py36_0
    prefix: D:miniconda3envsoldboy
    

    导入他人的开发环境

    conda env create -f environment.yaml

  • 相关阅读:
    转 ShowSlow+Yslow页面前端性能测试环境搭建
    ORA-01843 无效的月份
    微信回复图片
    springmvc 监听器getWriter() has already been called for this response问题
    执子之手 与子偕老
    美字
    睡至三更时凡功名都成幻境 想到百年后无少长俱是古人
    oracle regexp_like介绍和例子
    Oracle中如何判断字符串是否全为数字
    ruby for in 循环中改变i的值无效
  • 原文地址:https://www.cnblogs.com/lcfzh/p/10046463.html
Copyright © 2011-2022 走看看