自己生成这种文件的方法:
进入conda的这个子环境后 conda list -e > requirements.txt
使用这种文件来安装子环境的方法:
conda create -n py36 python==3.6
conda activate py36
conda install --yes --file requirements.txt
或者直接
conda create --name py36 --file requirements.txt
# This file may be used to create an environment using: # $ conda create --name <env> --file <this file> # platform: linux-64 atomicwrites=1.2.1=py36_0 attrs=18.2.0=py36h28b3542_0 backcall=0.1.0=py36_0 blas=1.0=mkl ca-certificates=2018.03.07=0 certifi=2018.10.15=py36_0 cffi=1.11.5=py36he75722e_1 chardet=3.0.4=pypi_0 cloudpickle=0.6.1=py36_0 cudatoolkit=9.0=h13b8566_0 cudnn=7.1.2=cuda9.0_0 cycler=0.10.0=py36h93f1223_0 cython=0.29=py36he6710b0_0 dask-core=0.20.0=py36_0 dbus=1.13.2=h714fa37_1 decorator=4.3.0=py36_0 expat=2.2.6=he6710b0_0 fontconfig=2.13.0=h9420a91_0 freetype=2.9.1=h8a8886c_1 glib=2.56.2=hd408876_0 gst-plugins-base=1.14.0=hbbd80ab_1 gstreamer=1.14.0=hb453b48_1 icu=58.2=h9c2bf20_1 idna=2.8=pypi_0 imageio=2.4.1=py36_0 intel-openmp=2019.0=118 ipython=7.1.1=py36h39e3cac_0 ipython_genutils=0.2.0=py36hb52b0d5_0 jedi=0.13.1=py36_0 jpeg=9b=h024ee3a_2 kiwisolver=1.0.1=py36hf484d3e_0 libedit=3.1.20170329=h6b74fdf_2 libffi=3.2.1=hd88cf55_4 libgcc-ng=8.2.0=hdf63c60_1 libgfortran-ng=7.3.0=hdf63c60_0 libpng=1.6.35=hbc83047_0 libstdcxx-ng=8.2.0=hdf63c60_1 libtiff=4.0.9=he85c1e1_2 libuuid=1.0.3=h1bed415_2 libxcb=1.13=h1bed415_1 libxml2=2.9.8=h26e45fe_1 matplotlib=3.0.1=py36h5429711_0 mkl=2018.0.3=1 mkl_fft=1.0.6=py36h7dd41cf_0 mkl_random=1.0.1=py36h4414c95_1 more-itertools=4.3.0=py36_0 nccl=1.3.5=cuda9.0_0 ncurses=6.1=hf484d3e_0 networkx=2.2=py36_1 ninja=1.8.2=py36h6bb024c_1 numpy=1.15.3=py36h1d66e8a_0 numpy-base=1.15.3=py36h81de0dd_0 olefile=0.46=py36_0 opencv-python=3.4.4.19=pypi_0 openssl=1.0.2p=h14c3975_0 pandas=0.23.4=pypi_0 parso=0.3.1=py36_0 pcre=8.42=h439df22_0 pexpect=4.6.0=py36_0 pickleshare=0.7.5=py36_0 pillow=5.3.0=py36h34e0f95_0 pip=10.0.1=py36_0 pluggy=0.8.0=py36_0 prompt_toolkit=2.0.7=py36_0 ptyprocess=0.6.0=py36_0 py=1.7.0=py36_0 pycocotools=2.0=pypi_0 pycparser=2.19=py36_0 pydot=1.2.4=py36_0 pygments=2.2.0=py36h0d3125c_0 pyparsing=2.2.2=py36_0 pyqt=5.9.2=py36h05f1152_2 pytest=3.9.3=py36_0 pytest-runner=4.2=py36_0 python=3.6.6=h6e4f718_2 python-dateutil=2.7.5=py36_0 pytorch=0.4.0=py36hdf912b8_0 pytz=2018.7=py36_0 pywavelets=1.0.1=py36hdd07704_0 qt=5.9.6=h8703b6f_2 readline=7.0=h7b6447c_5 requests=2.21.0=pypi_0 scipy=1.1.0=py36hfa4b5c9_1 setuptools=40.4.3=py36_0 sip=4.19.8=py36hf484d3e_0 six=1.11.0=py36_1 sqlite=3.25.2=h7b6447c_0 tk=8.6.8=hbc83047_0 toolz=0.9.0=py36_0 torchvision=0.2.1=py_2 tornado=5.1.1=py36h7b6447c_0 traitlets=4.3.2=py36_0 urllib3=1.24.1=pypi_0 wcwidth=0.1.7=py36_0 wheel=0.32.2=py36_0 xz=5.2.4=h14c3975_4 zlib=1.2.11=ha838bed_2