Pycharm is one of the best python IDEs for professional developers. However, users may regularly encounter errors when using it.
Beginners are the most vulnerable because they have little experience working with this Software. This article will solve a common error that beginners stumble upon when starting to code in Pycharm.
The error in question is shown in the screenshot below. It occurs when a developer is trying to execute a code.
As you can see, the error message reads, “Error running ‘main’: @NotNull method com/intellij/execution.configurations.GeneralcommanLine.getExePath must not return null. So what is it exactly, and how can you solve this?
If you encounter this error, Pycharm is simply trying to tell you that you don’t have an interpreter installed. In other words, you don’t have python installed on your computer.
If you don’t want to get out of the PyCharm Software, proceed with the “add interpreter” option. If you do that, you’ll see the screenshot below.
The next step should be to click the “OK” option. If you do that, the next screen you see will be similar to the one you now see below.
Once the download is complete, the program will start to install.
If your python installation gets canceled, the Software will give you an option for installing python manually. You can install it manually or proceed to click okay on the next screen, as shown below.
A successful manual installation will help you get back to the PyCharm home screen. Now, if you test your python code, you will learn that your code works when you execute it.
If you have any issues, please post them in the comments section. Good luck as you continue to code!!. Thank you for visiting our website.