官术网_书友最值得收藏!

How to do it...

  1. Manually create requirements.txt by typing in the packages to include in the project. The following is an example from https://pip.pypa.io/en/latest/reference/pip_install/#requirements-file-format:

  1. Alternatively, run pip freeze > requirements.txt. This automatically directs the currently installed packages to a properly formatted requirements file.
  2. To implement hash-checking mode, simply include the digest with the package name in the requirements file, demonstrated below:
      FooProject == 1.2 --hash=sha256:<hash_digest>

Note: Supported hash algorithms include: md5, sha1, sha224, sha384, sha256, and sha512.

  1. If there are module conflicts, or special versioning is needed, provide the first module required:
      m1
  1. Indicate the second module, but ensure the version installed pre-dates the known bad version:
      m2<1.7
  1. Provide the third module, ensuring it is at least equal to the minimum version required, but no greater than the maximum version that can be used:
     m3>=1.5, <=2.0

While the preceding screenshot shows some version specifier requirements, here is an example showing some of the different ways to specify module versions in requirements.txt:

        flask
flask-pretty == 0.2.0
flask-security <= 3.0
flask-oauthlib >= 0.9.0, <= 0.9.4
主站蜘蛛池模板: 武安市| 塔城市| 德安县| 青田县| 达州市| 鹤山市| 龙南县| 连平县| 鲜城| 盐山县| 武威市| 平武县| 三江| 龙江县| 汕尾市| 德安县| 鹤壁市| 扬中市| 如东县| 涞源县| 河曲县| 浑源县| 宜兰县| 民勤县| 科尔| 丽水市| 桂阳县| 同心县| 敖汉旗| 敦化市| 青河县| 蕲春县| 公主岭市| 巫溪县| 含山县| 云南省| 兴和县| 景谷| 浠水县| 泰顺县| 邯郸市|