• 在Anaconda创建虚拟环境


    联网环境 

    虚拟环境常用命令

    从开始菜单运行“Anaconda Prompt”,出现的界面输入创建虚拟环境的指令。

    创建了一个名字为v1,且基于python版本3.6的虚拟环境。

    在创建过程中需要回复(y/n),Yes。

    conda create -n v1 python==3.6

     

     

    激活虚拟环境

     查看安装库

    不联网环境 

    需指定安装初始包

    conda create --name v1 python=3.6.4 openssl=1.0.2 pip=9.0.
    1 setuptools=38.4 sqlite=3.22 ca-certificates=2017.08.26 requests=2.18.4 wheel=0
    .30.0 beautifulsoup4=4.6.0 conda=4.4.10 conda-env=2.6.0 --offline

    安装提示

    ## Package Plan ##
    
      environment location: C:ProgramDataAnaconda3envsv
    
      added / updated specs:
        - beautifulsoup4=4.6.0
        - ca-certificates=2017.08.26
        - conda-env=2.6.0
        - conda=4.4.10
        - openssl=1.0.2
        - pip=9.0.1
        - python=3.6.4
        - requests=2.18.4
        - setuptools=38.4
        - sqlite=3.22
        - wheel=0.30.0
    
    
    The following NEW packages will be INSTALLED:
    
        asn1crypto:      0.24.0-py36_0
        beautifulsoup4:  4.6.0-py36h4361f19_1
        ca-certificates: 2017.08.26-h94faf87_0
        certifi:         2018.1.18-py36_0
        cffi:            1.11.4-py36hfa6e2cd_0
        chardet:         3.0.4-py36hf2a9688_1
        conda:           4.4.10-py36_0
        conda-env:       2.6.0-h36134e3_1
        cryptography:    2.1.4-py36hd94e34c_0
        idna:            2.6-py36h787667b_1
        menuinst:        1.4.11-py36hfa6e2cd_0
        openssl:         1.0.2n-h74b6da3_0
        pip:             9.0.1-py36had87c14_4
        pycosat:         0.6.3-py36hbfdb8c3_0
        pycparser:       2.18-py36h315bf61_1
        pyopenssl:       17.5.0-py36h98b3c51_0
        pysocks:         1.6.7-py36hbb234f4_1
        python:          3.6.4-h6538335_1
        pywin32:         222-py36hfa6e2cd_0
        requests:        2.18.4-py36h964142b_1
        ruamel_yaml:     0.15.35-py36hfa6e2cd_1
        setuptools:      38.4.0-py36_0
        six:             1.11.0-py36h7f2c006_1
        sqlite:          3.22.0-h9d3ae62_0
        urllib3:         1.22-py36hf0c4117_0
        vc:              14-h0510ff6_3
        vs2015_runtime:  14.0.25123-3
        wheel:           0.30.0-py36h1201a8d_1
        win_inet_pton:   1.0.1-py36h6b5aef5_1
        wincertstore:    0.2-py36hcdd9a18_0
        yaml:            0.1.7-h896c600_2
    
    Proceed ([y]/n)? y
    
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    #
    # To activate this environment, use
    #
    #     $ conda activate v1
    #
    # To deactivate an active environment, use
    #
    #     $ conda deactivate

    激活虚拟环境

    conda activate v1
    (base) C:Users	est>conda activate v1
    
    (v1) C:Users	est>

    查看安装包

    (v1) C:Users	est>conda list
    # packages in environment at C:ProgramDataAnaconda3envsv1:
    #
    # Name                    Version                   Build  Channel
    asn1crypto                0.24.0                   py36_0
    beautifulsoup4            4.6.0            py36h4361f19_1
    ca-certificates           2017.08.26           h94faf87_0
    certifi                   2018.1.18                py36_0
    cffi                      1.11.4           py36hfa6e2cd_0
    chardet                   3.0.4            py36hf2a9688_1
    conda                     4.4.10                   py36_0
    conda-env                 2.6.0                h36134e3_1
    cryptography              2.1.4            py36hd94e34c_0
    idna                      2.6              py36h787667b_1
    menuinst                  1.4.11           py36hfa6e2cd_0
    openssl                   1.0.2n               h74b6da3_0
    pip                       9.0.1            py36had87c14_4
    pycosat                   0.6.3            py36hbfdb8c3_0
    pycparser                 2.18             py36h315bf61_1
    pyopenssl                 17.5.0           py36h98b3c51_0
    pysocks                   1.6.7            py36hbb234f4_1
    python                    3.6.4                h6538335_1
    pywin32                   222              py36hfa6e2cd_0
    requests                  2.18.4           py36h964142b_1
    ruamel_yaml               0.15.35          py36hfa6e2cd_1
    setuptools                38.4.0                   py36_0
    six                       1.11.0           py36h7f2c006_1
    sqlite                    3.22.0               h9d3ae62_0
    urllib3                   1.22             py36hf0c4117_0
    vc                        14                   h0510ff6_3
    vs2015_runtime            14.0.25123                    3
    wheel                     0.30.0           py36h1201a8d_1
    win_inet_pton             1.0.1            py36h6b5aef5_1
    wincertstore              0.2              py36hcdd9a18_0
    yaml                      0.1.7                h896c600_2

    查看环境

     

     

  • 相关阅读:
    二叉树的存储方式以及递归和非递归的三种遍历方式
    java基础04 匿名内部类
    jvm007 jvm知识点总览
    jvm学习006 jvm内存结构分配
    java基础03 位运算符
    java基础02 数据类型转
    jvm005 从jvm的角度谈谈线程的实现
    Arcgis投影变换后图像变深的问题
    win 7 64位如何安装erdas 9.2
    Win7 64bit 成功安装ArcView3.X
  • 原文地址:https://www.cnblogs.com/xiao-apple36/p/15267885.html
Copyright © 2020-2023  润新知