Detailed introduction to requirements.txt in Python

Source: Internet
Author: User
For more information about NLP, see references. Introduction

The Python project must contain a requirements.txt file to record all dependent packages and their exact version numbers. To deploy the new environment.

The main statement is as follows:

Pip freeze> requirements.txt # generate requirements.txt pip install-r requirements.txt # install dependencies from requirements.txt

Supported statement

-R base.txt # all packages under base.txt pypinyin = 0.12.0 # specified version (the most common method) django-querycount> = 0.5.0 # later than a certain version of django-debug-toolbar> = 1.3.1, <= 1.3.3 # Version range: ipython # default (no replacement exists, the latest version does not exist)

Third-party tool generation

Pip freeze will include unnecessary packages and packages dependent on some packages ~

Pipreqs automatically analyzes the packages referenced in the project. The Mysql package is ignored when the Django project is automatically built, and the version is strange. In addition, an error is reported when a 404 error occurs during online search.

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.