简体   繁体   中英

A wired requirements.txt format

I downloaded a requriments.txt file from a github repository, but i find it is a little different with the normal format of requirments.txt file.

  1. Can you tell me how the author generate this kind of requirments.txt? by which tools?
  2. How we can use this reuqirments.txt format to build up the python environment? I have wtried the either "conda install --file requirements.txt " or "pip install -r requirements.txt" on Windows platform, they cannot work out.

https://github.com/wvangansbeke/Unsupervised-Classification/blob/master/requirements.txt

""" This file contains a list of packages and their versions that were used to produce the results. """
  - _libgcc_mutex=0.1=main
  - blas=1.0=mkl
  - bzip2=1.0.8=h7b6447c_0
  - ca-certificates=2020.1.1=0
  - cairo=1.14.12=h8948797_3
  - certifi=2020.4.5.1=py37_0
  - cffi=1.14.0=py37h2e261b9_0
  - cmake=3.14.0=h52cb24c_0
  - cudatoolkit=10.0.130=0
  - cycler=0.10.0=py37_0
  - dbus=1.13.12=h746ee38_0
  - easydict=1.9=py_0
  - expat=2.2.6=he6710b0_0
  - faiss-gpu=1.6.3=py37h1a5d453_0
  - ffmpeg=4.0=hcdf2ecd_0
  - fontconfig=2.13.0=h9420a91_0
  - freeglut=3.0.0=hf484d3e_5
  - freetype=2.9.1=h8a8886c_1
  - glib=2.63.1=h5a9c865_0
  - graphite2=1.3.13=h23475e2_0
  - gst-plugins-base=1.14.0=hbbd80ab_1
  - gstreamer=1.14.0=hb453b48_1
  - h5py=2.8.0=py37h989c5e5_3
  - harfbuzz=1.8.8=hffaf4a1_0
  - hdf5=1.10.2=hba1933b_1
  - icu=58.2=h9c2bf20_1
  - imageio=2.8.0=py_0
  - intel-openmp=2020.0=166
  - jasper=2.0.14=h07fcdf6_1
  - joblib=0.14.1=py_0
  - jpeg=9b=h024ee3a_2
  - kiwisolver=1.1.0=py37he6710b0_0
  - krb5=1.17.1=h173b8e3_0
  - ld_impl_linux-64=2.33.1=h53a641e_7
  - libcurl=7.69.1=h20c2e04_0
  - libedit=3.1.20181209=hc058e9b_0
  - libffi=3.2.1=hd88cf55_4
  - libgcc-ng=9.1.0=hdf63c60_0
  - libgfortran-ng=7.3.0=hdf63c60_0
  - libglu=9.0.0=hf484d3e_1
  - libopencv=3.4.2=hb342d67_1
  - libopus=1.3.1=h7b6447c_0
  - libpng=1.6.37=hbc83047_0
  - libprotobuf=3.11.4=hd408876_0
  - libssh2=1.9.0=h1ba5d50_1
  - libstdcxx-ng=9.1.0=hdf63c60_0
  - libtiff=4.1.0=h2733197_0
  - libuuid=1.0.3=h1bed415_2
  - libvpx=1.7.0=h439df22_0
  - libxcb=1.13=h1bed415_1
  - libxml2=2.9.9=hea5a465_1
  - matplotlib=3.1.3=py37_0
  - matplotlib-base=3.1.3=py37hef1b27d_0
  - mkl=2020.0=166
  - mkl-service=2.3.0=py37he904b0f_0
  - mkl_fft=1.0.15=py37ha843d7b_0
  - mkl_random=1.1.0=py37hd6b4f25_0
  - ncurses=6.2=he6710b0_0
  - ninja=1.9.0=py37hfd86e86_0
  - numpy=1.18.1=py37h4f9e942_0
  - numpy-base=1.18.1=py37hde5b4d6_1
  - olefile=0.46=py_0
  - opencv=3.4.2=py37h6fd60c2_1
  - openssl=1.1.1g=h7b6447c_0
  - pcre=8.43=he6710b0_0
  - pillow=7.0.0=py37hb39fc2d_0
  - pip=20.0.2=py37_1
  - pixman=0.38.0=h7b6447c_0
  - protobuf=3.11.4=py37he6710b0_0
  - py-opencv=3.4.2=py37hb342d67_1
  - pycparser=2.20=py_0
  - pyparsing=2.4.6=py_0
  - pyqt=5.9.2=py37h05f1152_2
  - python=3.7.7=hcf32534_0_cpython
  - python-dateutil=2.8.1=py_0
  - pytorch=1.4.0=py3.7_cuda10.0.130_cudnn7.6.3_0
  - pyyaml=5.3.1=py37h7b6447c_0
  - qt=5.9.7=h5867ecd_1
  - readline=8.0=h7b6447c_0
  - rhash=1.3.8=h1ba5d50_0
  - scikit-learn=0.22.1=py37hd81dba3_0
  - scipy=1.4.1=py37h0b6359f_0
  - setuptools=46.1.3=py37_0
  - sip=4.19.8=py37hf484d3e_0
  - six=1.14.0=py37_0
  - sqlite=3.31.1=h7b6447c_0
  - swig=3.0.12=h38cdd7d_3
  - tensorboardx=2.0=py_0
  - termcolor=1.1.0=py37_1
  - tk=8.6.8=hbc83047_0
  - torchvision=0.5.0=py37_cu100
  - tornado=6.0.4=py37h7b6447c_1
  - typing=3.6.4=py37_0
  - wheel=0.34.2=py37_0
  - xz=5.2.4=h14c3975_4
  - yaml=0.1.7=had09818_2
  - zlib=1.2.11=h7b6447c_3
  - zstd=1.3.7=h0b5b093_0
  - pip:
    - blis==0.4.1
    - catalogue==1.0.0
    - chardet==3.0.4
    - cymem==2.0.3
    - en-core-web-sm==2.2.5
    - idna==2.9
    - importlib-metadata==1.6.0
    - murmurhash==1.0.2
    - plac==1.1.3
    - preshed==3.0.2
    - requests==2.23.0
    - spacy==2.2.4
    - srsly==1.0.2
    - thinc==7.4.0
    - tqdm==4.45.0
    - urllib3==1.25.8
    - wasabi==0.6.0
    - zipp==3.1.0

This looks like a conda environment.yml file. It can be used to create a conda environment, like so

conda env create --file requirements.txt

Also see How to make new anaconda env from yml file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM