Learning_coding
Learning_coding
2021-01-23 18:33

Anaconda通过environment.yml创建环境遇到的问题

  • python
  • 自然语言处理
  • bash

刚接触python,在通过environment.yml方式创建环境的时候,yml文件中的包为什么好多都下不下来呢?

1、这是我的yml文件,通过这条命令创建环境

conda env create --name=graftnet --file=environment.yml
name: conda-kbtextqa-2.7
channels:
- soumith
- defaults
dependencies:
- asn1crypto=0.24.0=py27_0
- backports=1.0=py27h63c9359_1
- backports.functools_lru_cache=1.5=py27_1
- backports_abc=0.5=py27h7b3c97b_0
- ca-certificates=2018.03.07=0
- certifi=2018.1.18=py27_0
- cffi=1.11.5=py27h9745a5d_0
- chardet=3.0.4=py27hfa10054_1
- cryptography=2.2.2=py27h14c3975_0
- cudatoolkit=8.0=3
- cudnn=7.0.5=cuda8.0_0
- cycler=0.10.0=py27hc7354d3_0
- dbus=1.13.2=h714fa37_1
- enum34=1.1.6=py27h99a27e9_1
- expat=2.2.5=he0dffb1_0
- fontconfig=2.12.6=h49f89f6_0
- freetype=2.8=hab7d2ae_1
- functools32=3.2.3.2=py27h4ead58f_1
- futures=3.2.0=py27h7b459c0_0
- glib=2.56.1=h000015b_0
- gst-plugins-base=1.14.0=hbbd80ab_1
- gstreamer=1.14.0=hb453b48_1
- icu=58.2=h9c2bf20_1
- idna=2.6=py27h5722d68_1
- intel-openmp=2018.0.0=8
- ipaddress=1.0.22=py27_0
- jpeg=9b=h024ee3a_2
- kiwisolver=1.0.1=py27hc15e7b5_0
- libedit=3.1=heed3624_0
- libffi=3.2.1=hd88cf55_4
- libgcc-ng=7.2.0=hdf63c60_3
- libgfortran-ng=7.2.0=hdf63c60_3
- libpng=1.6.34=hb9fc6fc_0
- libstdcxx-ng=7.2.0=hdf63c60_3
- libtiff=4.0.9=h28f6b97_0
- libxcb=1.13=h1bed415_1
- libxml2=2.9.8=hf84eae3_0
- matplotlib=2.2.2=py27h0e671d2_1
- mkl=2018.0.2=1
- mkl_fft=1.0.1=py27h3010b51_0
- mkl_random=1.0.1=py27h629b387_0
- ncurses=6.0=h9df7e31_2
- nltk=3.2.5=py27hec5f4de_0
- numpy=1.14.2=py27hdbf6ddf_1
- olefile=0.45.1=py27_0
- openssl=1.0.2o=h20670df_0
- pcre=8.42=h439df22_0
- pillow=5.0.0=py27h3deb7b8_0
- pip=10.0.1=py27_0
- psutil=5.4.3=py27h14c3975_0
- pycparser=2.18=py27hefa08c5_1
- pyopenssl=17.5.0=py27hcee3be0_0
- pyparsing=2.2.0=py27hf1513f8_1
- pyqt=5.9.2=py27h751905a_0
- pysocks=1.6.8=py27_0
- python=2.7.14=h1571d57_31
- python-dateutil=2.7.2=py27_0
- pytz=2018.4=py27_0
- pyyaml=3.12=py27h2d70dd7_1
- qt=5.9.5=h7e424d6_0
- readline=7.0=ha6073c6_4
- requests=2.18.4=py27hc5b0589_1
- scipy=1.0.1=py27hfc37229_0
- setuptools=39.0.1=py27_0
- singledispatch=3.4.0.3=py27h9bcb476_0
- sip=4.19.8=py27hf484d3e_0
- six=1.11.0=py27h5f960f1_1
- sqlite=3.22.0=h1bed415_0
- subprocess32=3.2.7=py27h373dbce_0
- tk=8.6.7=hc745277_3
- tornado=5.0.2=py27_0
- tqdm=4.19.8=py27_0
- urllib3=1.22=py27ha55213b_0
- wheel=0.31.0=py27_0
- xz=5.2.3=h55aa19d_2
- yaml=0.1.7=had09818_2
- zlib=1.2.11=ha838bed_2
- pytorch=0.3.1=py27_cuda8.0.61_cudnn7.0.5_2
- torchvision=0.1.9=py27hdb88a65_1
- pip:
  - backports-abc==0.5
  - backports.functools-lru-cache==1.5
  - future==0.16.0
  - mkl-fft==1.0.0
  - mkl-random==1.0.1
  - tagme==0.1.3
  - torch==0.3.1.post2

环境创建之后,通过"conda list"命令查看安装的包,发现好多都没有装上,这是为什么呢,该怎么解决呢?求助各位大佬

2、这是我执行“conda list”之后的结果

# Name                    Version                   Build  Channel
asn1crypto                0.24.0                   py27_0    defaults
backports                 1.0                pyhd3eb1b0_2    defaults
backports.functools_lru_cache 1.5                      py27_1    defaults
backports_abc             0.5                        py_1    defaults
ca-certificates           2018.03.07                    0    defaults
certifi                   2018.1.18                py27_0    defaults
futures                   3.3.0                    py27_0    defaults
intel-openmp              2018.0.0                      8    defaults
ipaddress                 1.0.22                   py27_0    defaults
mkl                       2018.0.2                      1    defaults
olefile                   0.45.1                   py27_0    defaults
pip                       20.3.3                   pypi_0    pypi
pysocks                   1.6.8                    py27_0    defaults
python                    2.7.18               hfb89ab9_0    defaults
python-dateutil           2.7.2                    py27_0    defaults
pytz                      2018.4                   py27_0    defaults
setuptools                39.0.1                   py27_0    defaults
singledispatch            3.4.0.3                 py_1001    defaults
six                       1.15.0             pyhd3eb1b0_0    defaults
sqlite                    3.30.1               h0c8e037_0    defaults
tornado                   5.0.2                    py27_0    defaults
tqdm                      4.19.8                   py27_0    defaults
vc                        9                    h7299396_1    defaults
vs2008_runtime            9.00.30729.1         hfaea7d5_1    defaults
wheel                     0.31.0                   py27_0    defaults
win_inet_pton             1.1.0                    py27_0    defaults
wincertstore              0.2              py27hf04cefb_0    defaults

 

3、我的conda info 如下

 active environment : graftnet
    active env location : D:\developer_tools\Anaconda\envs\graftnet
            shell level : 2
       user config file : C:\Users\Administrator.PC-20200208MOTP\.condarc
 populated config files : C:\Users\Administrator.PC-20200208MOTP\.condarc
          conda version : 4.9.2
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : D:\developer_tools\Anaconda  (writable)
           channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
          package cache : D:\developer_tools\Anaconda\pkgs
                          C:\Users\Administrator.PC-20200208MOTP\.conda\pkgs
                          C:\Users\Administrator.PC-20200208MOTP\AppData\Local\conda\conda\pkgs
       envs directories : D:\developer_tools\Anaconda\envs
                          C:\Users\Administrator.PC-20200208MOTP\.conda\envs
                          C:\Users\Administrator.PC-20200208MOTP\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.9.2 requests/2.18.4 CPython/3.6.5 Windows/7 Windows/6.1.7601
          administrator : True
             netrc file : None
           offline mode : False

再次感谢各位大佬

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答