Run anything
Double
Run Anything is a quick way to launch run/debug configurations, scripts, Python console, install packages, and open recent projects. It also helps you use proper command syntax by generating suggestions as you type. When you call a command, Run Anything delegates the further work to the appropriate tools.
Press twice.
Alternatively, click on the toolbar.
tip
To disable the Double-Ctrl mapping for this action, select Disable double modifier key shortcuts on the Advanced Settings page of the IDE settings
The icon is hidden by default. To add the icon to the toolbar, open the Settings dialog () , go to Appearance and Behavior | Menus and Toolbars, expand the Main Toolbar node, and add the Run Anything action, for example, below Search Everywhere. For more information. For more information, refer to Menus and toolbars.
You can use Run Anything to run Python files. PyCharm will create and run a temporary run/debug configuration.
Type
python
, select the required file from the list of suggestions, and press :To debug a file, hold when launching it:
Start typing the run/debug configuration name and select it from the list of suggestions:
To debug a run configuration, hold when launching it.
Run Anything allows you to manage Python packages by executing pip
and conda
commands.
The commands are executed in the context of the current Python interpreter.
Type
pip
followed by the command. You can select the command from the list of suggestions. When you press , you accept the current suggestion:Start typing the package name and select the required package from the list of suggestions:
To get the list of available versions, type
==
after the package name:
Type
conda
followed by the command. You can select the command from the list of suggestions. When you press , you accept the current suggestion:Start typing the package name and select the required package from the list of suggestions:
note
At the moment, the
pip
andconda
commands are supported only for local interpreters.
To launch the Python console, type
python
and press .To get the list of all available commands, type
?
. The list of commands depends on the installed/enabled plugins. If a command is not on the suggestion list, it will be executed in the terminal.
By default, the working directory depends on the project or module you are currently in. To use the location of the current file as the working directory, hold when running a command.
You can also use an arbitrary location as the working directory. It is configured in the top-right corner of the dialog:
You can also quickly reopen a recent project from the Run Anything popup. Search for the project by the name or type open
to shorten the list of suggestions, then select the required project from the list, and press :
If, while composing an HTTP request, you specified its name, you can find and send this HTTP request from the Run Anything popup.
Start typing the name of an HTTP request and select it from the suggestion list: