在Anaconda创建虚拟环境

联网环境 

虚拟环境常用命令

在Anaconda创建虚拟环境

 

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

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

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

 

conda create -n v1 python==3.6

 

 在Anaconda创建虚拟环境

 

 

 在Anaconda创建虚拟环境

 

 

激活虚拟环境

在Anaconda创建虚拟环境

 

 

 查看安装库

在Anaconda创建虚拟环境

 

 

 

不联网环境 

需指定安装初始包

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:\ProgramData\Anaconda3\envs\v

  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\test>conda activate v1

(v1) C:\Users\test>

查看安装包

(v1) C:\Users\test>conda list
# packages in environment at C:\ProgramData\Anaconda3\envs\v1:
#
# 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

查看环境

在Anaconda创建虚拟环境

 

 在Anaconda创建虚拟环境

 

 在Anaconda创建虚拟环境

 

上一篇:javascript获取日期,年,月,日


下一篇:c++第十三章 -(副本构造器)