PyCharm
 
Get PyCharm

Use requirements.txt

Last modified: 11 October 2024

PyCharm provides integration with the major means of requirements management and makes it possible to track the unsatisfied requirements in your projects and create a virtual environment based on the requirements.txt file .

You can also run pip freeze > requirements.txt in the command line to generate a requirements.txt file for your project. See https://pip.pypa.io/en/stable/reference/pip_freeze/ for more details.

If the name of the requirements file differs from requirements.txt or when you have several requirements files in one project, you have to notify PyCharm about the requirements file you want to apply.

Though you can always run the Sync Python Requirements to update the requirements file, PyCharm provides quick fixes that enable populating this file.

PyCharm provides quick fixes and notifications related to the unsatisfied dependencies.

You can also click Ignore requirements. In this case, you will be able to remove the packages from the list of the ignored packages.