Не могу запустить скрипты на Pycharm
По какой-то причине, когда я впервые скачал и установил python, pip не работал. Я переустановил python и установил путь интерпретатора на Pycharm, но теперь, когда я делаю конфигурацию и запускаю, ничего не происходит. Я даже не могу распечатать простой Hello World. Консоль выводит код выхода 0, но больше ничего не происходит.
Возможно, я сделал что-то не так при настройке Pycharm, я очень ценю любые рекомендации по решению!
Пожалуйста, опубликуйте свой код, чтобы мы могли видеть, с чем вы работаете. А если побежать python <filename> ?
Мой код состоял только из оператора печати, чтобы убедиться, что интерпретатор работает правильно. Кнопка запуска в порядке, но когда я нажимаю ее, она сразу же выходит и говорит, что вышла с кодом выхода 0.
Вероятно, в вашем коде есть ошибка. Не могли бы вы опубликовать свой код?
Я не очень хорошо знаком с pycharm. Где он обычно отображает вывод кода? Есть ли для этого отдельное окно/представление?
@SolomonUcko строка, которую я использовал для проверки, была просто print(‘Hello, World’)
@DamonLarcom, вероятно, это потому, что Pycharm не выполняет такие сценарии, как IDLE Python.
@JohnGordon он появится на вкладке «Выполнение» в Pycharm. Я регулярно использую IntelliJ для Java, но не могу решить эту проблему с помощью Pycharm.
@ Джерри М. У меня раньше работал Pycharm, я просто попытался переустановить python, потому что pip не работал должным образом. С тех пор он не работал. У вас есть идеи, что я могу сделать, чтобы это исправить?
Run and rerun applications
With PyCharm, you can run entire applications as well as particular scripts.
PyCharm uses settings that are defined in a Run/debug configurations. All the run configurations that currently exist in a project, are available in the Select Run/Debug Configuration list.

If you want to see the list of all currently running applications, select Run | Show Running List from the main menu. Refer to the View running processes section for details.
Note that after you’ve started a run session, the icon in the Run tool window and in the Run/Debug Configuration Selector toggles to to indicate that the run process is active.
You can configure some tools (for example, npm scripts) to be launched before running. In this case, PyCharm runs the tools, and after success will run the application. Otherwise, the application starts immediately.
If the options that launch tools before running were enabled in a Run/Debug configuration, PyCharm runs the tools, and after success will run the application. Otherwise, the program will start immediately.
Running a script
Choose Run | Run from the main menu or press Alt+Shift+F10 , and then select the desired run/debug configuration.
This way it’s possible to run any available run/debug configuration — one has to choose the desired run/debug configuration from the popup menu that shows all the run/debug configurations, existing in a project.

For the main clause: In the gutter, click , and choose the desired command.
Choose Run <name> from the context menu:
Select the desired module in the Project tool window and choose Run <name > from the context menu of the selection.
You can review any output from your running applications in the Run window console. The output from each application is displayed in its own tab of the Run tool window, named after the corresponding run/debug configuration.
If you re-run an application, the new output overwrites the contents of the tab. To preserve the output of an application, even if you re-run it, pin the output tab.
Using the Run pop-up menu
Invoke the Run popup menu either by choosing the Run | Run command from the main menu, or by pressing Alt+Shift+F10 .

From this popup menu that you can:
Invoke the Edit Configuration dialog .
Edit the selected configuration before launch F4 .
Instantly delete a configuration Delete .
Switch from run to debug and vice versa (hold Shift ).
Access a previously selected configuration 1 .
This popup menu can also be quickly accessed by pressing F9 , when you’re not running any debug session.
Rerunning applications
In the Run window, select the tab where the desired application is opened.
In the toolbar of the Run window, click the Rerun button
, or press Ctrl+F5 .
If you want to re-run without loosing focus in the editor tab you are working in, press Shift+F10 .
Настройка run в PyCharm
Сколько не гуглил, так и не нашел как сделать чтобы работали кнопки справа сверху (обведены). Т.е. чтобы код можно было запускать прямо в pycharm. Скрины настроек тут же. Кнопки которые не работают

Вам нужно добавить конфигурацию запуска: сказать PyCharm, какой файл запускать и с какими параметрами. Сделать это можно двумя способами:
1) Простой способ — кликнуть правой клавишей мыши по области, где вы пишите код и в контекстном меню выбрать run -filename- (первый скриншот)

2) Но также вы можете настроить конфигурации запуска путем открытия настроек конфигурации. Сверху, рядом с кнопкой пуска — Edit configurations -> Add configuration, далее выбираете файл, который хотите запустить (указываете путь до него в поле script path), и нажимаете safe configuration. После чего сможете запустить ваш код прямо в пайшарме (скрины 2-. )