Detailed description of Requirements.txt's full contents

Source: Internet
Author: User
Recently learned Python in the requirements.txt, perhaps because it is too simple, the online did not search for a more complete introduction, so this article mainly introduced about Python requirements.txt related information, the need for friends can refer to the following to see it together.

Brief introduction

A Python project must contain a requirements.txt file that records all dependent packages and their exact version numbers. For new environments to be deployed.

The main wording is as follows

Pip freeze > Requirements.txt # Generate Requirements.txtpip install-r requirements.txt # dependencies from Requirements.txt installation

Supported notation

-R base.txt # base.txt all packages below pypinyin==0.12.0 # specified version (most everyday notation) django-querycount>=0.5.0 # is greater than a version Django-debug-toolbar >=1.3.1,<=1.3.3 # Version Range Ipython # default (there is no replacement, there is no install the latest version)

Third-party tool generation

Pip freeze comes with some packages that are not needed, as well as packages that are dependent on some packages ~

Pipreqs automatically analyzes the packages referenced in the project. When the Django project was built automatically, the MySQL package was ignored, and the version was strange, and when the Internet search encountered 404, the error jumped.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.