PyCharm 2024.1 Help

Create and run

PyCharm provides an action that helps create script, intended for building, distributing, and installing modules. Once is created, the corresponding action becomes disabled


  1. In the Project tool window, select the package. Then, go to Tools | Create in the main menu.

  2. In the New Setup Script dialog, specify package name, its version, the author, the author email, the package description, and any licence details:

    Create a file
  3. Click OK when ready. PyCharm creates and opens it in the editor.

    The in the editor

    Note that PyCharm creates the file with the limited set of the arguments. You might want to manually add the rest of the needed details. For more information about arguments, refer to the Python Packaging User Guide.

When you work with any project that comes, you can run some tasks to build, install, and distribute packages described within the file. PyCharm helps you create the command-line sequence of the following format: <task> <arguments>

Run a task

  1. In the main menu, go to Tools | Run

  2. In the Enter task name dialog, type the letters of the task names.

    Run a setup script

    Note that asterisk wildcard and initial letters of the snake_case names are honored. As you type, the suggestion list shrinks to show the matching names only. Choose the desired task, and press Enter.

  3. In the Command Line field, enter the argument of the task to execute.

    Adding a CLI argument for the test

    You can leave this field empty if no arguments are needed.

  4. Once you click OK, the command line begins to execute in the Run tool window.

    Executing the task

    For more information about the command arguments, refer to Building and Distributing Packages with Setuptools.

Last modified: 26 May 2024