PyCharmCE中Ctrl-R快捷键及运行按钮失效(无输出窗口)求助
Hey John, let's work through this problem step by step—since your script runs perfectly in both PyCharm's built-in terminal and external terminals, the issue is almost certainly a UI or configuration glitch in PyCharm itself, not a problem with your code. Here are targeted fixes to try:
Check if the Run output window is hidden/minimized
It's easy to accidentally drag the Run window to the edge of the screen or minimize it, making it look like there's no output. Try pressingAlt+4(PyCharm's default shortcut for the Run tool window) to bring it up, or navigate toView > Tool Windows > Runfrom the top menu. If you find it, right-click the window's title bar and make surePin Tabis checked to prevent it from hiding again.Reset your Run Configuration
Corrupted run configurations can break the run functionality entirely. Click the dropdown menu next to the green run button, selectEdit Configurations..., then find your script's configuration. Click the-button to delete it, then click+and add a newPythonconfiguration, selecting your script file path. Save the new configuration and test running again.Invalidate PyCharm's cache
Cached files often cause odd UI/functional bugs. Go toFile > Invalidate Caches..., check the box forInvalidate and Restart, and let PyCharm reboot. This clears temporary files without affecting your code, and often resolves weird shortcut or run issues.Reverify your Keymap binding
Even though you saw Ctrl+R in the Keymap, it's worth double-checking for conflicts or misbindings. OpenFile > Settings > Keymap, search forRun 'your_script_name', right-click it, and selectAdd Keyboard Shortcut. Rebind Ctrl+R (PyCharm will alert you if there's a conflict). You can also temporarily switch to theDefaultkeymap from the dropdown menu, restart PyCharm, and see if the problem goes away.Disable "Run in Background" mode
Sometimes PyCharm runs tasks in the background without showing the output window. If you can bring up the Run window, look for a small "Run in Background" icon (usually in the top-right corner of the window) and click it to toggle back to foreground execution. Also, in your Run configuration, make sureRun in terminalis not checked (though this is less likely since your terminal runs the script fine).Repair your PyCharm installation
If none of the above works, corrupted installation files might be the culprit. OpenHelp > Find Action, search forRepair IDE, and run the repair tool. It will scan and fix any damaged files in your PyCharm installation.
内容的提问来源于stack exchange,提问作者John

