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

  • 相关阅读:
    分享下在小程序中怎么做循环
    微信程序开发语法
    微信小程序底部导航栏(tabbar)
    vue 跨域 和django跨域
    Pytest中如何解决测试用例的依赖执行问题
    python远程连接linux
    python+selenium之XPATH定位
    linux模拟弱网延迟和丢包
    django配置mysql数据库
    django项目引入bootstrap
  • 原文地址:https://www.cnblogs.com/lcfzh/p/10046463.html
Copyright © 2011-2022 走看看